How to use the eventman.call function in eventman

To help you get started, we’ve selected a few eventman examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github animachine / animachine / src / editor / utils / Input.js View on Github external
function Input(opt={}) {

    EventEmitter.call(this);

    this._createBase();

    this._defaultValue = opt.defaultValue || '';
    this._value = opt.value || this._defaultValue;

    if ('flex' in opt) this.domElem.style.flex = opt.flex;
    if ('parent' in opt) opt.parent.appendChild(this.domElem);
    if (opt.onChange) this.on('change', opt.onChange);
}
github animachine / animachine / src / editor / warehouseman / storages / Download.js View on Github external
function Download(opt) {

    EventEmitter.call(this);

    opt = opt || {};

    this._root = opt.root || '_Download/';

    this.icon = 'download';
    this.tooltip = 'Download';
}
github animachine / animachine / src / editor / modules / css / paramsTab / Input.js View on Github external
function Input(opt) {

    EventEmitter.call(this);

    this._onChangeInput = this._onChangeInput.bind(this);
    this._onChangeParam = this._onChangeParam.bind(this);
    this._onSelect = this._onSelect.bind(this);
    this._onClickStepPrevKey = this._onClickStepPrevKey.bind(this);
    this._onClickStepNextKey = this._onClickStepNextKey.bind(this);
    this._onClickTgglKey = this._onClickTgglKey.bind(this);

    this._name = '';

    if ('name' in opt) this.name = opt.name;

    this._createBase();
}
github animachine / animachine / src / editor / toolbar / Toolbar.js View on Github external
function Toolbar(opt) {

    EventEmitter.call(this);

    opt = opt || {};

    this._height = opt.height || 24;
    this._icons = [];
    this._separators = {};

    this.domElem = document.createElement('div');
    this.domElem.style.position = 'fixed';
    this.domElem.style.display = 'flex';
    this.domElem.style.backgroundColor = opt.bgColor || amgui.color.bg0;
    this.domElem.style.pointerEvents = 'auto';
    this.domElem.style.height = this._height + 'px';

    this.addSeparator({name: 'first'});
    this.addSeparator({name: 'tools'});
github animachine / animachine / src / editor / track / Track.js View on Github external
function Track(opt, timeline) {

    EventEmitter.call(this);

    this.timeline = timeline;

    this._selectors = [];
    this._endParams = [];

    this._selectedElems = [];
    this._isHidingSelectedElems = false;
    this._isPlaying = false;

    if (!this._paramFactory) this._paramFactory = new ParamFactory({}, this.timeline);

    this._onSelectClick = this._onSelectClick.bind(this);
    this._onChangeSelectors = this._onChangeSelectors.bind(this);
    this._onWindowResize = this._onWindowResize.bind(this);
    this._onWindowScroll = this._onWindowScroll.bind(this);
github animachine / animachine / src / editor / project / Project.js View on Github external
function Project(save = {}) {

    EventEmitter.call(this);

    this._timelines = [];
    this.inputs = {};

    this.useSave(save);
}
github azazdeaz / transhand / old-src / hands / Transformer.js View on Github external
function Transformer(transhand) {

    EventEmitter.call(this);

    this._th = transhand;
    this._params = _.clone(INIT_PARAMS);
    this._base = _.clone(INIT_BASE);
    this._points = [{}, {}, {}, {}];
    this._pOrigin = {};
    this._originRadius = 6;
    this._rotateFingerDist = 16;


    this._onDrag = this._onDrag.bind(this);
    this._onMouseUp = this._onMouseUp.bind(this);
    this._onMouseMove = this._onMouseMove.bind(this);
    this._onMouseDown = this._onMouseDown.bind(this);
    this._rafOnDrag = this._rafOnDrag.bind(this);
    this._onOverHitbox = this._onOverHitbox.bind(this);
github azazdeaz / transhand / es5 / hands / Transformer.js View on Github external
function Transformer(transhand) {
    EventEmitter.call(this);

    this._th = transhand;
    this._params = _.clone(INIT_PARAMS);
    this._base = _.clone(INIT_BASE);
    this._points = [{}, {}, {}, {}];
    this._pOrigin = {};
    this._originRadius = 6;
    this._rotateFingerDist = 16;


    this._onDrag = this._onDrag.bind(this);
    this._onMouseUp = this._onMouseUp.bind(this);
    this._onMouseMove = this._onMouseMove.bind(this);
    this._onMouseDown = this._onMouseDown.bind(this);
    this._rafOnDrag = this._rafOnDrag.bind(this);
    this._onOverHitbox = this._onOverHitbox.bind(this);
github animachine / animachine / src / editor / track / Param.js View on Github external
function Param (opt={}, timeline) {

    EventEmitter.call(this);

    this.timeline = timeline;

    this._lineH =  amgui.LINE_HEIGHT;
    this._inputs = [];
    this._defaultValue = opt.defaultValue || 0;

    this._onChangeInput = this._onChangeInput.bind(this);
    this._onClickTgglKey = this._onClickTgglKey.bind(this);
    this._onClickStepPrevKey = this._onClickStepPrevKey.bind(this);
    this._onClickStepNextKey = this._onClickStepNextKey.bind(this);

    this._createKeyline(opt.keyLine);
    this._createOptions(opt.optionLine);

    this.keyLine.parentParam = this;
github animachine / animachine / src / editor / modules / am-domtree / Branch.js View on Github external
function Branch() {

    EventEmitter.call(this);

    this._onClick = this._onClick.bind(this);

    this._createBase();
}

eventman

Node.js EventEmitter implementation with some extra feature (bindable scopes, subevents, no double listener registration)

ISC
Latest version published 10 years ago

Package Health Score

42 / 100
Full package analysis

Popular eventman functions