mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-26 16:14:56 +01:00
18 lines
445 B
JavaScript
18 lines
445 B
JavaScript
const Options = new Class({
|
|
|
|
setOptions() {
|
|
const options = this.options = Object.merge.apply(null, [{}, this.options].append(arguments));
|
|
if (this.addEvent) {
|
|
for (const 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;
|