UNPKG

autograph

Version:

A visual data routing automation tool.

40 lines (33 loc) 706 B
/** * Transmit a received signal after a given timelapse. * * @class * @type {*} */ var DelayComponent = BaseComponent.extend({ label: "delay", inputs: { trigger: { name: "input" }, period: { name: "period", description: "Period of the delay in milliseconds." } }, outputs: { output: {name: "output"} }, defaults: { period: 500 }, initialize: function () { BaseComponent.prototype.initialize.call(this); }, receiveBang: function () { var self = this; setTimeout(function () { self.sendBang(); }, this.get("period")); } });