mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Remove options class.
This commit is contained in:
parent
359d3e0723
commit
fb4568a817
@ -1,22 +0,0 @@
|
|||||||
import merge from 'lodash/merge';
|
|
||||||
|
|
||||||
class Options {
|
|
||||||
setOptions(...args) {
|
|
||||||
const options = merge({}, this.options, ...args);
|
|
||||||
this.options = options;
|
|
||||||
|
|
||||||
if (this.addEvent) {
|
|
||||||
const optionsKeys = Object.keys(options);
|
|
||||||
for (let index = 0; index < optionsKeys.length; index++) {
|
|
||||||
const option = optionsKeys[index];
|
|
||||||
if (typeof options[option] === 'function' && /^on[A-Z]/.test(option)) {
|
|
||||||
this.addEvent(option, options[option]);
|
|
||||||
delete options[option];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Options;
|
|
Loading…
Reference in New Issue
Block a user