leafer-game 2.2.6 → 2.2.8
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/web.js +122 -77
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/dist/web.module.js +122 -79
- package/dist/web.module.min.js +1 -1
- package/dist/web.module.min.js.map +1 -1
- package/package.json +12 -12
package/dist/web.module.js
CHANGED
|
@@ -4814,7 +4814,7 @@ const matrix$1 = {}, {round: round$3} = Math;
|
|
|
4814
4814
|
const LeafHelper = {
|
|
4815
4815
|
updateAllMatrix(leaf, checkAutoLayout, waitAutoLayout) {
|
|
4816
4816
|
if (checkAutoLayout && leaf.__hasAutoLayout && leaf.__layout.matrixChanged) waitAutoLayout = true;
|
|
4817
|
-
updateMatrix$
|
|
4817
|
+
updateMatrix$2(leaf, checkAutoLayout, waitAutoLayout);
|
|
4818
4818
|
if (leaf.isBranch) {
|
|
4819
4819
|
const {children: children} = leaf;
|
|
4820
4820
|
for (let i = 0, len = children.length; i < len; i++) {
|
|
@@ -4835,9 +4835,10 @@ const LeafHelper = {
|
|
|
4835
4835
|
if (layout.matrixChanged) leaf.__updateLocalMatrix();
|
|
4836
4836
|
if (!layout.waitAutoLayout) leaf.__updateWorldMatrix();
|
|
4837
4837
|
},
|
|
4838
|
-
updateBounds(leaf) {
|
|
4838
|
+
updateBounds(leaf, noUpdateSize) {
|
|
4839
4839
|
const layout = leaf.__layout;
|
|
4840
4840
|
if (layout.boundsChanged) leaf.__updateLocalBounds();
|
|
4841
|
+
if (noUpdateSize) layout.resized = undefined;
|
|
4841
4842
|
if (!layout.waitAutoLayout) leaf.__updateWorldBounds();
|
|
4842
4843
|
},
|
|
4843
4844
|
updateAllWorldOpacity(leaf) {
|
|
@@ -4860,7 +4861,7 @@ const LeafHelper = {
|
|
|
4860
4861
|
}
|
|
4861
4862
|
},
|
|
4862
4863
|
updateAllChange(leaf) {
|
|
4863
|
-
updateChange
|
|
4864
|
+
updateChange(leaf);
|
|
4864
4865
|
if (leaf.isBranch) {
|
|
4865
4866
|
const {children: children} = leaf;
|
|
4866
4867
|
for (let i = 0, len = children.length; i < len; i++) {
|
|
@@ -4882,6 +4883,13 @@ const LeafHelper = {
|
|
|
4882
4883
|
if (!fromWorld) fromWorld = leaf.__nowWorld;
|
|
4883
4884
|
if (leaf.__worldFlipped || Platform.fullImageShadow) currentCanvas.copyWorldByReset(fromCanvas, fromWorld, leaf.__nowWorld, blendMode, onlyResetTransform); else currentCanvas.copyWorldToInner(fromCanvas, fromWorld, leaf.__layout.renderBounds, blendMode);
|
|
4884
4885
|
},
|
|
4886
|
+
clip(leaf, canvas, options) {
|
|
4887
|
+
if (leaf.__worldOpacity) {
|
|
4888
|
+
canvas.setWorld(leaf.__nowWorld = leaf.__getNowWorld(options));
|
|
4889
|
+
leaf.__drawRenderPath(canvas);
|
|
4890
|
+
canvas.clipUI(leaf);
|
|
4891
|
+
}
|
|
4892
|
+
},
|
|
4885
4893
|
renderComplex(_leaf, _canvas, _options) {},
|
|
4886
4894
|
updateComplex(_leaf) {},
|
|
4887
4895
|
checkComplex(_leaf) {},
|
|
@@ -5032,7 +5040,7 @@ const LeafHelper = {
|
|
|
5032
5040
|
|
|
5033
5041
|
const L$1 = LeafHelper;
|
|
5034
5042
|
|
|
5035
|
-
const {updateAllMatrix: updateAllMatrix$4, updateMatrix: updateMatrix$
|
|
5043
|
+
const {updateAllMatrix: updateAllMatrix$4, updateMatrix: updateMatrix$2, updateAllWorldOpacity: updateAllWorldOpacity, updateAllChange: updateAllChange$1, updateChange: updateChange} = L$1;
|
|
5036
5044
|
|
|
5037
5045
|
function getTempLocal(t, worldPoint) {
|
|
5038
5046
|
t.updateLayout();
|
|
@@ -5078,7 +5086,7 @@ function checkMask(target, index) {
|
|
|
5078
5086
|
return findMask < 0 ? null : (findMask && (findMask = -1), true);
|
|
5079
5087
|
}
|
|
5080
5088
|
|
|
5081
|
-
const {updateBounds: updateBounds$
|
|
5089
|
+
const {updateBounds: updateBounds$3} = LeafHelper;
|
|
5082
5090
|
|
|
5083
5091
|
const BranchHelper = {
|
|
5084
5092
|
sort(a, b) {
|
|
@@ -5139,10 +5147,10 @@ const BranchHelper = {
|
|
|
5139
5147
|
branch = branchStack[i];
|
|
5140
5148
|
children = branch.children;
|
|
5141
5149
|
for (let j = 0, len = children.length; j < len; j++) {
|
|
5142
|
-
updateBounds$
|
|
5150
|
+
updateBounds$3(children[j]);
|
|
5143
5151
|
}
|
|
5144
5152
|
if (exclude && exclude === branch) continue;
|
|
5145
|
-
updateBounds$
|
|
5153
|
+
updateBounds$3(branch);
|
|
5146
5154
|
}
|
|
5147
5155
|
},
|
|
5148
5156
|
move(branch, x, y) {
|
|
@@ -5204,7 +5212,7 @@ const WaitHelper = {
|
|
|
5204
5212
|
}
|
|
5205
5213
|
};
|
|
5206
5214
|
|
|
5207
|
-
const {getRelativeWorld: getRelativeWorld$1, updateBounds: updateBounds$
|
|
5215
|
+
const {getRelativeWorld: getRelativeWorld$1, updateBounds: updateBounds$2} = LeafHelper;
|
|
5208
5216
|
|
|
5209
5217
|
const {toOuterOf: toOuterOf$3, getPoints: getPoints, copy: copy$4} = BoundsHelper;
|
|
5210
5218
|
|
|
@@ -5312,7 +5320,7 @@ class LeafLayout {
|
|
|
5312
5320
|
}
|
|
5313
5321
|
update() {
|
|
5314
5322
|
const {leaf: leaf} = this, {leafer: leafer} = leaf;
|
|
5315
|
-
if (leaf.isApp) return updateBounds$
|
|
5323
|
+
if (leaf.isApp) return updateBounds$2(leaf);
|
|
5316
5324
|
if (leafer) {
|
|
5317
5325
|
if (leafer.ready) leafer.watcher.changed && leafer.layouter.layout(); else leafer.start();
|
|
5318
5326
|
} else {
|
|
@@ -6049,9 +6057,12 @@ const LeafDataProxy = {
|
|
|
6049
6057
|
}
|
|
6050
6058
|
},
|
|
6051
6059
|
emitPropertyEvent(type, name, oldValue, newValue) {
|
|
6052
|
-
const
|
|
6053
|
-
|
|
6054
|
-
|
|
6060
|
+
const {leafer: leafer} = this;
|
|
6061
|
+
if (leafer.config.trackChanges || leafer.zoomLayer === this) {
|
|
6062
|
+
const event = new PropertyEvent(type, this, name, oldValue, newValue);
|
|
6063
|
+
this.isLeafer || this.hasEvent(type) && this.emitEvent(event);
|
|
6064
|
+
leafer.emitEvent(event);
|
|
6065
|
+
} else leafer.watcher.add(this);
|
|
6055
6066
|
},
|
|
6056
6067
|
__realSetAttr(name, newValue) {
|
|
6057
6068
|
const data = this.__;
|
|
@@ -6096,9 +6107,9 @@ const LeafMatrix = {
|
|
|
6096
6107
|
}
|
|
6097
6108
|
};
|
|
6098
6109
|
|
|
6099
|
-
const {updateMatrix: updateMatrix$
|
|
6110
|
+
const {updateMatrix: updateMatrix$1, updateAllMatrix: updateAllMatrix$3} = LeafHelper;
|
|
6100
6111
|
|
|
6101
|
-
const {updateBounds: updateBounds$
|
|
6112
|
+
const {updateBounds: updateBounds$1} = BranchHelper;
|
|
6102
6113
|
|
|
6103
6114
|
const {toOuterOf: toOuterOf$2, copyAndSpread: copyAndSpread$2, copy: copy$3} = BoundsHelper;
|
|
6104
6115
|
|
|
@@ -6201,14 +6212,14 @@ const LeafBounds = {
|
|
|
6201
6212
|
if (this.__layout.childrenSortChanged) this.__updateSortChildren();
|
|
6202
6213
|
if (this.__layout.boxChanged) this.__updateFlowLayout();
|
|
6203
6214
|
updateAllMatrix$3(this);
|
|
6204
|
-
updateBounds$
|
|
6215
|
+
updateBounds$1(this, this);
|
|
6205
6216
|
if (this.__.__autoSide) this.__updateBoxBounds(true);
|
|
6206
6217
|
} else {
|
|
6207
6218
|
updateAllMatrix$3(this);
|
|
6208
|
-
updateBounds$
|
|
6219
|
+
updateBounds$1(this, this);
|
|
6209
6220
|
}
|
|
6210
6221
|
} else {
|
|
6211
|
-
updateMatrix$
|
|
6222
|
+
updateMatrix$1(this);
|
|
6212
6223
|
}
|
|
6213
6224
|
},
|
|
6214
6225
|
__updateNaturalSize() {
|
|
@@ -6254,11 +6265,7 @@ const LeafRender = {
|
|
|
6254
6265
|
}
|
|
6255
6266
|
},
|
|
6256
6267
|
__clip(canvas, options) {
|
|
6257
|
-
|
|
6258
|
-
canvas.setWorld(this.__nowWorld = this.__getNowWorld(options));
|
|
6259
|
-
this.__drawRenderPath(canvas);
|
|
6260
|
-
canvas.clipUI(this);
|
|
6261
|
-
}
|
|
6268
|
+
LeafHelper.clip(this, canvas, options);
|
|
6262
6269
|
},
|
|
6263
6270
|
__updateWorldOpacity() {
|
|
6264
6271
|
this.__worldOpacity = this.__.visible ? this.parent ? this.parent.__worldOpacity * this.__.opacity : this.__.opacity : 0;
|
|
@@ -6881,9 +6888,12 @@ let Branch = class Branch extends Leaf {
|
|
|
6881
6888
|
if (this.isFrame) child.__bindFrame(null);
|
|
6882
6889
|
}
|
|
6883
6890
|
__emitChildEvent(type, child) {
|
|
6884
|
-
const
|
|
6885
|
-
if (
|
|
6886
|
-
|
|
6891
|
+
const {leafer: leafer} = this;
|
|
6892
|
+
if (leafer.config.trackChanges || leafer.zoomLayer === this) {
|
|
6893
|
+
const event = new ChildEvent(type, child, this);
|
|
6894
|
+
if (this.hasEvent(type) && !this.isLeafer) this.emitEvent(event);
|
|
6895
|
+
leafer.emitEvent(event);
|
|
6896
|
+
} else leafer.watcher.addChild(child, this, type);
|
|
6887
6897
|
}
|
|
6888
6898
|
};
|
|
6889
6899
|
|
|
@@ -7036,7 +7046,7 @@ class LeafLevelList {
|
|
|
7036
7046
|
}
|
|
7037
7047
|
}
|
|
7038
7048
|
|
|
7039
|
-
const version = "2.2.
|
|
7049
|
+
const version = "2.2.8";
|
|
7040
7050
|
|
|
7041
7051
|
const debug$5 = Debug.get("LeaferCanvas");
|
|
7042
7052
|
|
|
@@ -7364,6 +7374,7 @@ class Watcher {
|
|
|
7364
7374
|
}
|
|
7365
7375
|
constructor(target, userConfig) {
|
|
7366
7376
|
this.totalTimes = 0;
|
|
7377
|
+
this.changed = 0;
|
|
7367
7378
|
this.config = {};
|
|
7368
7379
|
this.__updatedList = new LeafList;
|
|
7369
7380
|
this.target = target;
|
|
@@ -7383,8 +7394,10 @@ class Watcher {
|
|
|
7383
7394
|
this.disabled = true;
|
|
7384
7395
|
}
|
|
7385
7396
|
update() {
|
|
7386
|
-
this.changed
|
|
7387
|
-
|
|
7397
|
+
if (this.changed < 100) {
|
|
7398
|
+
this.changed++;
|
|
7399
|
+
if (this.running) this.target.emit(RenderEvent.REQUEST);
|
|
7400
|
+
}
|
|
7388
7401
|
}
|
|
7389
7402
|
__onAttrChange(event) {
|
|
7390
7403
|
this.add(event.target);
|
|
@@ -7393,18 +7406,21 @@ class Watcher {
|
|
|
7393
7406
|
if (this.config.usePartLayout) this.__updatedList.add(leaf);
|
|
7394
7407
|
this.update();
|
|
7395
7408
|
}
|
|
7396
|
-
|
|
7409
|
+
addChild(child, parent, eventType) {
|
|
7397
7410
|
if (this.config.usePartLayout) {
|
|
7398
|
-
if (
|
|
7411
|
+
if (eventType === ChildEvent.ADD) {
|
|
7399
7412
|
this.hasAdd = true;
|
|
7400
|
-
this.__pushChild(
|
|
7413
|
+
this.__pushChild(child);
|
|
7401
7414
|
} else {
|
|
7402
7415
|
this.hasRemove = true;
|
|
7403
|
-
this.__updatedList.add(
|
|
7416
|
+
this.__updatedList.add(parent);
|
|
7404
7417
|
}
|
|
7405
7418
|
}
|
|
7406
7419
|
this.update();
|
|
7407
7420
|
}
|
|
7421
|
+
__onChildEvent(event) {
|
|
7422
|
+
this.addChild(event.child, event.parent, event.type);
|
|
7423
|
+
}
|
|
7408
7424
|
__pushChild(child) {
|
|
7409
7425
|
this.__updatedList.add(child);
|
|
7410
7426
|
if (child.isBranch) this.__loopChildren(child);
|
|
@@ -7419,7 +7435,8 @@ class Watcher {
|
|
|
7419
7435
|
}));
|
|
7420
7436
|
this.__updatedList = new LeafList;
|
|
7421
7437
|
this.totalTimes++;
|
|
7422
|
-
this.
|
|
7438
|
+
this.hasVisible = this.hasRemove = this.hasAdd = false;
|
|
7439
|
+
this.changed = 0;
|
|
7423
7440
|
}
|
|
7424
7441
|
__listenEvents() {
|
|
7425
7442
|
this.__eventIds = [ this.target.on_([ [ PropertyEvent.CHANGE, this.__onAttrChange, this ], [ [ ChildEvent.ADD, ChildEvent.REMOVE ], this.__onChildEvent, this ], [ WatchEvent.REQUEST, this.__onRquestData, this ] ]) ];
|
|
@@ -7440,47 +7457,57 @@ const {updateAllMatrix: updateAllMatrix$2, updateBounds: updateOneBounds, update
|
|
|
7440
7457
|
|
|
7441
7458
|
const {pushAllChildBranch: pushAllChildBranch, pushAllParent: pushAllParent} = BranchHelper;
|
|
7442
7459
|
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
if (
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
if (
|
|
7456
|
-
|
|
7460
|
+
const LayouterHelper = {
|
|
7461
|
+
updateMatrix(updateList, levelList) {
|
|
7462
|
+
let index = 0, leaf, layout;
|
|
7463
|
+
const {list: list} = updateList;
|
|
7464
|
+
while (index < list.length) {
|
|
7465
|
+
leaf = list[index];
|
|
7466
|
+
layout = leaf.__layout;
|
|
7467
|
+
if (levelList.without(leaf) && !layout.proxyZoom) {
|
|
7468
|
+
if (layout.matrixChanged) {
|
|
7469
|
+
updateAllMatrix$2(leaf, true);
|
|
7470
|
+
if (leaf.isBranch) pushAllChildBranch(leaf, levelList);
|
|
7471
|
+
push(leaf, levelList);
|
|
7472
|
+
} else if (layout.boundsChanged) {
|
|
7473
|
+
if (leaf.isBranch) leaf.__tempNumber = 0;
|
|
7474
|
+
push(leaf, levelList);
|
|
7475
|
+
}
|
|
7457
7476
|
}
|
|
7477
|
+
index++;
|
|
7458
7478
|
}
|
|
7459
|
-
}
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7479
|
+
},
|
|
7480
|
+
updateBounds(boundsList) {
|
|
7481
|
+
let index = 0, level, list, branch, children;
|
|
7482
|
+
const {levels: levels, levelMap: levelMap} = boundsList;
|
|
7483
|
+
boundsList.sort(true);
|
|
7484
|
+
while (index < levels.length) {
|
|
7485
|
+
level = levels[index];
|
|
7486
|
+
list = levelMap[level];
|
|
7487
|
+
for (let i = 0, len = list.length; i < len; i++) {
|
|
7488
|
+
branch = list[i];
|
|
7489
|
+
if (branch.isBranch && branch.__tempNumber) {
|
|
7490
|
+
children = branch.children;
|
|
7491
|
+
for (let j = 0, jLen = children.length; j < jLen; j++) {
|
|
7492
|
+
if (!children[j].isBranch) {
|
|
7493
|
+
updateOneBounds(children[j]);
|
|
7494
|
+
}
|
|
7474
7495
|
}
|
|
7475
7496
|
}
|
|
7497
|
+
updateOneBounds(branch);
|
|
7476
7498
|
}
|
|
7477
|
-
|
|
7499
|
+
index++;
|
|
7478
7500
|
}
|
|
7479
|
-
}
|
|
7480
|
-
|
|
7501
|
+
},
|
|
7502
|
+
updateChange(updateList) {
|
|
7503
|
+
updateList.list.forEach(updateOneChange);
|
|
7504
|
+
},
|
|
7505
|
+
push: push
|
|
7506
|
+
};
|
|
7481
7507
|
|
|
7482
|
-
function
|
|
7483
|
-
|
|
7508
|
+
function push(leaf, levelList) {
|
|
7509
|
+
levelList.add(leaf);
|
|
7510
|
+
pushAllParent(leaf, levelList);
|
|
7484
7511
|
}
|
|
7485
7512
|
|
|
7486
7513
|
const {worldBounds: worldBounds} = LeafBoundsHelper;
|
|
@@ -7587,9 +7614,9 @@ class Layouter {
|
|
|
7587
7614
|
target.emitEvent(new LayoutEvent(BEFORE, blocks, this.times));
|
|
7588
7615
|
this.extraBlock = null;
|
|
7589
7616
|
updateList.sort();
|
|
7590
|
-
updateMatrix
|
|
7591
|
-
updateBounds
|
|
7592
|
-
updateChange(updateList);
|
|
7617
|
+
LayouterHelper.updateMatrix(updateList, this.__levelList);
|
|
7618
|
+
LayouterHelper.updateBounds(this.__levelList);
|
|
7619
|
+
LayouterHelper.updateChange(updateList);
|
|
7593
7620
|
if (this.extraBlock) blocks.push(this.extraBlock);
|
|
7594
7621
|
blocks.forEach(item => item.setAfter());
|
|
7595
7622
|
target.emitEvent(new LayoutEvent(LAYOUT, blocks, this.times));
|
|
@@ -7619,11 +7646,16 @@ class Layouter {
|
|
|
7619
7646
|
if (target.isBranch) BranchHelper.updateBounds(target); else LeafHelper.updateBounds(target);
|
|
7620
7647
|
updateAllChange(target);
|
|
7621
7648
|
}
|
|
7622
|
-
addExtra(leaf) {
|
|
7649
|
+
addExtra(leaf, updateBounds) {
|
|
7623
7650
|
if (!this.__updatedList.has(leaf)) {
|
|
7624
7651
|
const {updatedList: updatedList, beforeBounds: beforeBounds} = this.extraBlock || (this.extraBlock = new LayoutBlockData([]));
|
|
7625
7652
|
updatedList.length ? beforeBounds.add(leaf.__world) : beforeBounds.set(leaf.__world);
|
|
7626
7653
|
updatedList.add(leaf);
|
|
7654
|
+
if (updateBounds) {
|
|
7655
|
+
const list = this.__levelList;
|
|
7656
|
+
LayouterHelper.push(leaf, list);
|
|
7657
|
+
list.sort(true);
|
|
7658
|
+
}
|
|
7627
7659
|
}
|
|
7628
7660
|
}
|
|
7629
7661
|
createBlock(data) {
|
|
@@ -7948,7 +7980,7 @@ class Picker {
|
|
|
7948
7980
|
for (let i = 0, len = list.length; i < len; i++) {
|
|
7949
7981
|
find = list[i];
|
|
7950
7982
|
if (ignoreHittable || LeafHelper.worldHittable(find)) {
|
|
7951
|
-
this.hitChild(find, find.hitThrough ? this.point : point);
|
|
7983
|
+
this.hitChild(find, find.hitThrough ? this.point : point, find.mask && find.parent && find.parent.__onlyHitMask);
|
|
7952
7984
|
if (findList.length) {
|
|
7953
7985
|
if (find.isBranchLeaf && list.some(item => item !== find && LeafHelper.hasParent(item, find))) {
|
|
7954
7986
|
findList.reset();
|
|
@@ -8047,7 +8079,7 @@ class Picker {
|
|
|
8047
8079
|
}
|
|
8048
8080
|
const leaf = proxy || child, {hitThrough: hitThrough} = child, {findList: findList} = this;
|
|
8049
8081
|
if (hitThrough) {
|
|
8050
|
-
const index = findList.list.findIndex(item => item[hitThrough] === child[hitThrough]);
|
|
8082
|
+
const index = findList.list.findIndex(item => hitThrough === "parent" ? LeafHelper.hasParent(item.parent, child.parent) : item[hitThrough] === child[hitThrough]);
|
|
8051
8083
|
if (index > 0) return findList.addAt(leaf, index);
|
|
8052
8084
|
}
|
|
8053
8085
|
findList.add(leaf);
|
|
@@ -8111,7 +8143,17 @@ Platform.render = function(target, canvas, options) {
|
|
|
8111
8143
|
});
|
|
8112
8144
|
options.topList = new LeafList;
|
|
8113
8145
|
target.__render(canvas, options);
|
|
8114
|
-
if (options.topList.length) options.topList.forEach(item =>
|
|
8146
|
+
if (options.topList.length) options.topList.forEach(item => {
|
|
8147
|
+
const {parent: parent} = item;
|
|
8148
|
+
if (parent && parent.isBranchLeaf && parent.overflow !== "show") {
|
|
8149
|
+
canvas.save();
|
|
8150
|
+
LeafHelper.clip(parent, canvas, topOptions);
|
|
8151
|
+
item.__render(canvas, topOptions);
|
|
8152
|
+
canvas.restore();
|
|
8153
|
+
} else {
|
|
8154
|
+
item.__render(canvas, topOptions);
|
|
8155
|
+
}
|
|
8156
|
+
});
|
|
8115
8157
|
};
|
|
8116
8158
|
|
|
8117
8159
|
function effectType(defaultValue) {
|
|
@@ -9075,6 +9117,7 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
9075
9117
|
start: true,
|
|
9076
9118
|
hittable: true,
|
|
9077
9119
|
smooth: true,
|
|
9120
|
+
trackChanges: true,
|
|
9078
9121
|
lazySpeard: 100
|
|
9079
9122
|
};
|
|
9080
9123
|
this.leafs = 0;
|
|
@@ -12342,7 +12385,7 @@ function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds
|
|
|
12342
12385
|
data.__naturalHeight = image.height / data.pixelRatio;
|
|
12343
12386
|
if (data.__autoSide) {
|
|
12344
12387
|
ui.forceUpdate();
|
|
12345
|
-
LeafHelper.updateBounds(ui);
|
|
12388
|
+
LeafHelper.updateBounds(ui, true);
|
|
12346
12389
|
ui.__layout.boundsChanged = true;
|
|
12347
12390
|
if (ui.__proxyData) {
|
|
12348
12391
|
ui.setProxyAttr("width", data.width);
|
|
@@ -15585,12 +15628,12 @@ ui$1.getMotionContentHeight = function() {
|
|
|
15585
15628
|
return this.__layout.boxBounds.height;
|
|
15586
15629
|
};
|
|
15587
15630
|
|
|
15588
|
-
ui$1.getMotionPoint = function(motionDistance,
|
|
15631
|
+
ui$1.getMotionPoint = function(motionDistance, motionAround, motionVertical, offsetX = 0, offsetY = 0, pathElement) {
|
|
15589
15632
|
if (!pathElement) pathElement = getMotionPath(this);
|
|
15590
15633
|
const data = getMotionPathData(pathElement);
|
|
15591
15634
|
if (!data.total) return {};
|
|
15592
15635
|
const point = HighCurveHelper.getDistancePoint(data, motionDistance, pathElement.motionPrecision, offsetX);
|
|
15593
|
-
const {motionRotation: motionRotation
|
|
15636
|
+
const {motionRotation: motionRotation} = this;
|
|
15594
15637
|
if (isNumber(motionRotation)) point.rotation += motionRotation;
|
|
15595
15638
|
if (motionAround && motionAround !== "top-left") {
|
|
15596
15639
|
AroundHelper.toPoint(motionAround, this.__layout.boxBounds, tempPoint);
|
|
@@ -15650,7 +15693,7 @@ function updateMotion(leaf) {
|
|
|
15650
15693
|
if (data.total) leaf.__.__pathForRender = HighCurveHelper.getDistancePath(data, motion, leaf.motionPrecision);
|
|
15651
15694
|
} else {
|
|
15652
15695
|
if (leaf.motionText) leaf.__updateMotionText(); else {
|
|
15653
|
-
const point = leaf.getMotionPoint(motion);
|
|
15696
|
+
const point = leaf.getMotionPoint(motion, leaf.motionAround);
|
|
15654
15697
|
if (leaf.motionRotation === false) delete point.rotation;
|
|
15655
15698
|
leaf.set(point);
|
|
15656
15699
|
}
|
|
@@ -15837,4 +15880,4 @@ LeafHelper.cacheId = function(t) {
|
|
|
15837
15880
|
if (leafer.cacheInnerId) leafer.app.innerIdMap[t.innerId] = t;
|
|
15838
15881
|
};
|
|
15839
15882
|
|
|
15840
|
-
export { AlignHelper, Animate, AnimateEasing, AnimateEvent, AnimateList, Answer, App, AroundHelper, AutoBounds, BezierHelper, Bounds, BoundsEvent, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, Cursor, DataHelper, Debug, Direction4, Direction9, DragBoundsHelper, DragEvent$1 as DragEvent, Dragger, DropEvent, Effect, Ellipse, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Filter, Finder, FourNumberHelper, Frame, FrameData, Group, GroupData, HighBezierHelper, HighCurveHelper, HitCanvasManager, Image$1 as Image, ImageData, ImageEvent, ImageManager, IncrementId, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferData, LeaferEvent, LeaferFilm, LeaferImage, LeaferVideo, Line, LineData, MathHelper, Matrix, MatrixHelper, MoveEvent, MyDragEvent, MyImage, MyPointerEvent, MyTouchEvent, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathBounds, PathCommandDataHelper, PathCommandMap, PathCommandNodeHelper, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathNodeHandleType, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, PenData, Picker, Platform, Plugin, Point, PointHelper, PointerButton, PointerEvent$1 as PointerEvent, Polygon, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, Resource, Robot, RobotData, RotateEvent, Run, Selector, Star, StarData, State, StringNumberMap, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert, TextData, TouchEvent, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIEvent, UIRender, UnitConvert, UnitConvertHelper, WaitHelper, WatchEvent, Watcher, ZoomEvent, affectRenderBoundsType, affectStrokeBoundsType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, createAttr, createDescriptor, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, dimType, doBoundsType, doStrokeType, doSurfaceType, effectType, emptyData, eraserType, extraPropertyEventMap, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isArray, isData, isEmptyData, isFinite, isNull, isNumber, isObject, isString, isUndefined, layoutProcessor, leaferTransformAttrMap, maskType, motionPathType, naturalBoundsType, opacityType, path, pathInputType, pathType, pen, positionType, registerPointsCurve, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleType, scrollType, sortType, stateStyleType, stateType, strokeType, surfaceType, tempBounds$2 as tempBounds, tempMatrix$2 as tempMatrix, tempPoint$6 as tempPoint, tryToNumber, useCanvas, useModule, version, visibleType, zoomLayerType };
|
|
15883
|
+
export { AlignHelper, Animate, AnimateEasing, AnimateEvent, AnimateList, Answer, App, AroundHelper, AutoBounds, BezierHelper, Bounds, BoundsEvent, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, Cursor, DataHelper, Debug, Direction4, Direction9, DragBoundsHelper, DragEvent$1 as DragEvent, Dragger, DropEvent, Effect, Ellipse, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Filter, Finder, FourNumberHelper, Frame, FrameData, Group, GroupData, HighBezierHelper, HighCurveHelper, HitCanvasManager, Image$1 as Image, ImageData, ImageEvent, ImageManager, IncrementId, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, LayouterHelper, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferData, LeaferEvent, LeaferFilm, LeaferImage, LeaferVideo, Line, LineData, MathHelper, Matrix, MatrixHelper, MoveEvent, MyDragEvent, MyImage, MyPointerEvent, MyTouchEvent, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathBounds, PathCommandDataHelper, PathCommandMap, PathCommandNodeHelper, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathNodeHandleType, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, PenData, Picker, Platform, Plugin, Point, PointHelper, PointerButton, PointerEvent$1 as PointerEvent, Polygon, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, Resource, Robot, RobotData, RotateEvent, Run, Selector, Star, StarData, State, StringNumberMap, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert, TextData, TouchEvent, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIEvent, UIRender, UnitConvert, UnitConvertHelper, WaitHelper, WatchEvent, Watcher, ZoomEvent, affectRenderBoundsType, affectStrokeBoundsType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, createAttr, createDescriptor, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, dimType, doBoundsType, doStrokeType, doSurfaceType, effectType, emptyData, eraserType, extraPropertyEventMap, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isArray, isData, isEmptyData, isFinite, isNull, isNumber, isObject, isString, isUndefined, layoutProcessor, leaferTransformAttrMap, maskType, motionPathType, naturalBoundsType, opacityType, path, pathInputType, pathType, pen, positionType, registerPointsCurve, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleType, scrollType, sortType, stateStyleType, stateType, strokeType, surfaceType, tempBounds$2 as tempBounds, tempMatrix$2 as tempMatrix, tempPoint$6 as tempPoint, tryToNumber, useCanvas, useModule, version, visibleType, zoomLayerType };
|