优化回调分离

This commit is contained in:
Harvey Zack committed 2018-11-15 14:24:12 +08:00
1 parent 4b61098945
commit ac1ba12767
11 files changed
+108 -53

No files matched your search

+4 -3
View File
@@ -28,10 +28,11 @@ export default class Layers {
this.art.emit('layers:click', $layer);
});
}
this.art.emit('layers:add', $layer);
callback && callback($layer);
this[name] = $layer;
insertByIndex($layers, $layer, layer.index || id);
this[name] = $layer;
item.callback && item.callback($layer);
callback && callback($layer);
this.art.emit('layers:add', $layer);
}
}