mirror of
https://gitee.com/antv/g6.git
synced 2024-12-05 05:09:07 +08:00
chore(mode): resume mode controller
This commit is contained in:
parent
d6e62d8a5e
commit
1957047b67
@ -4,7 +4,7 @@
|
||||
*/
|
||||
const Util = require('../../util');
|
||||
const Behavior = require('../../behavior');
|
||||
/* eslint-disable */
|
||||
|
||||
function mergeBehaviors(modeBehaviors, behaviors) {
|
||||
Util.each(behaviors, behavior => {
|
||||
if (modeBehaviors.indexOf(behavior) < 0) {
|
||||
@ -88,15 +88,11 @@ class Mode {
|
||||
if (!modes) {
|
||||
modes = this.mode;
|
||||
}
|
||||
console.log(add);
|
||||
if (add) {
|
||||
console.log('in add');
|
||||
self.modes[modes] = mergeBehaviors(self.modes[modes], behaviors);
|
||||
} else {
|
||||
console.log('in delete')
|
||||
self.modes[modes] = filterBehaviors(self.modes[modes], behaviors);
|
||||
}
|
||||
console.log(self.modes.default.length);
|
||||
self.setMode(this.mode);
|
||||
return this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user