wisemapping-frontend/packages/mindplot/lib/components/Options.js
2021-09-29 17:24:07 -03:00

16 lines
467 B
JavaScript

const Options = new Class({
setOptions: function () {
var options = this.options = Object.merge.apply(null, [{}, this.options].append(arguments));
if (this.addEvent) for (var option in options) {
if (typeOf(options[option]) != 'function' || !(/^on[A-Z]/).test(option)) continue;
this.addEvent(option, options[option]);
delete options[option];
}
return this;
}
});
export default Options;