add loading

This commit is contained in:
Harvey Zack committed 2018-10-15 17:36:10 +08:00
1 parent e319afd422
commit 7cdf9f69e6
14 files changed
+329 -6

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@ export default class Layers {
this.art.option.layers.forEach(this.add);
}
add(option) {
add(option, callback) {
const { refs } = this.art;
id++;
@@ -21,6 +21,6 @@ export default class Layers {
`);
const $layer = refs.$layers.querySelector(`[data-art-layer-id="${id}"]`);
option.callback && option.callback($layer);
callback && callback($layer);
}
}