modern-canvas 0.14.12 → 0.14.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/scene/main/Node.d.ts +0 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4931,9 +4931,9 @@ let I = class extends Pe {
|
|
|
4931
4931
|
moveChild(r, e, t = r.internalMode) {
|
|
4932
4932
|
if (this.equal(r))
|
|
4933
4933
|
return this;
|
|
4934
|
-
r.hasParent() && !this.equal(r.parent) && r.remove();
|
|
4935
|
-
const s = this._children.getInternal(
|
|
4936
|
-
return
|
|
4934
|
+
(r.hasParent() && !this.equal(r.parent) || r.internalMode !== t) && r.remove();
|
|
4935
|
+
const s = this._children.getInternal(t), i = s.indexOf(r);
|
|
4936
|
+
return e = Math.max(0, e), i !== e && (i > -1 && (s.splice(i, 1), e = Math.max(0, e - 1), this.emit("removeChild", r, i)), r.setParent(this), e < s.length ? s.splice(e, 0, r) : s.push(r), this.emit("addChild", r, e)), r.internalMode !== t && (r.internalMode = t), this;
|
|
4937
4937
|
}
|
|
4938
4938
|
removeChild(r) {
|
|
4939
4939
|
const e = r.getIndex();
|
|
@@ -21,7 +21,6 @@ export interface NodeEvents extends CoreObjectEvents, InputEvents {
|
|
|
21
21
|
process: [delta?: number];
|
|
22
22
|
processed: [delta?: number];
|
|
23
23
|
addChild: [child: Node, newIndex: number];
|
|
24
|
-
moveChild: [child: Node, newIndex: number, oldIndex: number];
|
|
25
24
|
removeChild: [child: Node, oldIndex: number];
|
|
26
25
|
}
|
|
27
26
|
export interface Node {
|