Skip to content

Commit 6da2e75

Browse files
committed
add onLoadEnd in Layer
1 parent 3d0d555 commit 6da2e75

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/layer/Layer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,15 @@ class Layer extends JSONAble(Eventable(Renderable(Class))) {
7777
return this;
7878
}
7979
if (this.onLoad()) {
80+
this._initRenderer();
8081
const zIndex = this.getZIndex();
8182
if (!isNil(zIndex)) {
8283
this._renderer.setZIndex(zIndex);
8384
if (!this.isCanvasRender()) {
8485
this._renderer.render();
8586
}
8687
}
88+
this.onLoadEnd();
8789
}
8890
return this;
8991
}
@@ -414,6 +416,9 @@ class Layer extends JSONAble(Eventable(Renderable(Class))) {
414416
return true;
415417
}
416418

419+
onLoadEnd() {
420+
}
421+
417422
/**
418423
* Whether the layer is loaded
419424
* @return {Boolean}
@@ -448,7 +453,6 @@ class Layer extends JSONAble(Eventable(Renderable(Class))) {
448453
this.setZIndex(zIndex);
449454
}
450455
this._switchEvents('on', this);
451-
this._initRenderer();
452456

453457
this.onAdd();
454458

0 commit comments

Comments
 (0)