leafer-ui 2.2.5 → 2.2.7

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.
@@ -1904,7 +1904,7 @@ function getNameList(name) {
1904
1904
 
1905
1905
  const D$5 = Debug;
1906
1906
 
1907
- const debug$g = Debug.get("RunTime");
1907
+ const debug$h = Debug.get("RunTime");
1908
1908
 
1909
1909
  const Run = {
1910
1910
  currentId: 0,
@@ -1923,7 +1923,7 @@ const Run = {
1923
1923
  const time = R$1.idMap[id], name = R$1.nameMap[id];
1924
1924
  const duration = microsecond ? (performance.now() - time) / 1e3 : Date.now() - time;
1925
1925
  R$1.idMap[id] = R$1.nameMap[id] = R$1.nameToIdMap[name] = undefined;
1926
- debug$g.log(name, duration, "ms");
1926
+ debug$h.log(name, duration, "ms");
1927
1927
  },
1928
1928
  endOfName(name, microsecond) {
1929
1929
  const id = R$1.nameToIdMap[name];
@@ -1959,18 +1959,18 @@ const Creator = {
1959
1959
  }
1960
1960
  };
1961
1961
 
1962
- const debug$f = Debug.get("UICreator");
1962
+ const debug$g = Debug.get("UICreator");
1963
1963
 
1964
1964
  const UICreator = {
1965
1965
  list: {},
1966
1966
  register(UI) {
1967
1967
  const {__tag: tag} = UI.prototype;
1968
- if (list$1[tag]) debug$f.repeat(tag);
1968
+ if (list$1[tag]) debug$g.repeat(tag);
1969
1969
  list$1[tag] = UI;
1970
1970
  },
1971
1971
  get(tag, data, x, y, width, height) {
1972
1972
  if (!list$1[tag]) {
1973
- debug$f.warn("not register " + tag);
1973
+ debug$g.warn("not register " + tag);
1974
1974
  return undefined;
1975
1975
  }
1976
1976
  const ui = new list$1[tag](data);
@@ -1986,7 +1986,7 @@ const UICreator = {
1986
1986
 
1987
1987
  const {list: list$1} = UICreator;
1988
1988
 
1989
- const debug$e = Debug.get("EventCreator");
1989
+ const debug$f = Debug.get("EventCreator");
1990
1990
 
1991
1991
  const EventCreator = {
1992
1992
  nameList: {},
@@ -1994,7 +1994,7 @@ const EventCreator = {
1994
1994
  let name;
1995
1995
  Object.keys(Event).forEach(key => {
1996
1996
  name = Event[key];
1997
- if (isString(name)) nameList[name] && debug$e.repeat(name), nameList[name] = Event;
1997
+ if (isString(name)) nameList[name] && debug$f.repeat(name), nameList[name] = Event;
1998
1998
  });
1999
1999
  },
2000
2000
  changeName(oldName, newName) {
@@ -3003,7 +3003,7 @@ const {rect: rect$3, roundRect: roundRect$2, arcTo: arcTo$3, arc: arc$3, ellipse
3003
3003
 
3004
3004
  const {ellipticalArc: ellipticalArc} = EllipseHelper;
3005
3005
 
3006
- const debug$d = Debug.get("PathConvert");
3006
+ const debug$e = Debug.get("PathConvert");
3007
3007
 
3008
3008
  const setEndPoint$1 = {};
3009
3009
 
@@ -3270,7 +3270,7 @@ const PathConvert = {
3270
3270
  break;
3271
3271
 
3272
3272
  default:
3273
- debug$d.error(`command: ${command} [index:${i}]`, old);
3273
+ debug$e.error(`command: ${command} [index:${i}]`, old);
3274
3274
  return data;
3275
3275
  }
3276
3276
  lastCommand = command;
@@ -3333,7 +3333,10 @@ const {tan: tan, min: min$1, abs: abs$4} = Math;
3333
3333
 
3334
3334
  const startPoint = {};
3335
3335
 
3336
+ const debug$d = Debug.get("PointsCurve");
3337
+
3336
3338
  const PathCommandDataHelper = {
3339
+ pointsCurveList: {},
3337
3340
  beginPath(data) {
3338
3341
  data.length = 0;
3339
3342
  },
@@ -3403,12 +3406,22 @@ const PathCommandDataHelper = {
3403
3406
  data.push(M$3, startPoint.x, startPoint.y);
3404
3407
  arc$2(data, x, y, radius, startAngle, endAngle, anticlockwise);
3405
3408
  },
3406
- drawPoints(data, points, curve, close) {
3407
- BezierHelper.points(data, points, curve, close);
3409
+ drawPoints(data, points, curve, close, options) {
3410
+ let type = "Q";
3411
+ if (isObject(curve)) type = curve.type, curve = curve.value;
3412
+ if (!pointsCurveList[type]) debug$d.warn("not found:", type), type = "Q";
3413
+ pointsCurveList[type](data, points, curve, close, options);
3408
3414
  }
3409
3415
  };
3410
3416
 
3411
- const {ellipse: ellipse$3, arc: arc$2} = PathCommandDataHelper;
3417
+ const {ellipse: ellipse$3, arc: arc$2, pointsCurveList: pointsCurveList} = PathCommandDataHelper;
3418
+
3419
+ function registerPointsCurve(type, fn) {
3420
+ if (pointsCurveList[type]) debug$d.repeat(type);
3421
+ pointsCurveList[type] = fn;
3422
+ }
3423
+
3424
+ registerPointsCurve("Q", BezierHelper.points);
3412
3425
 
3413
3426
  const {moveTo: moveTo$4, lineTo: lineTo$3, quadraticCurveTo: quadraticCurveTo, bezierCurveTo: bezierCurveTo, closePath: closePath$3, beginPath: beginPath, rect: rect$2, roundRect: roundRect$1, ellipse: ellipse$2, arc: arc$1, arcTo: arcTo$2, drawEllipse: drawEllipse, drawArc: drawArc, drawPoints: drawPoints$2} = PathCommandDataHelper;
3414
3427
 
@@ -4801,7 +4814,7 @@ const matrix$1 = {}, {round: round} = Math;
4801
4814
  const LeafHelper = {
4802
4815
  updateAllMatrix(leaf, checkAutoLayout, waitAutoLayout) {
4803
4816
  if (checkAutoLayout && leaf.__hasAutoLayout && leaf.__layout.matrixChanged) waitAutoLayout = true;
4804
- updateMatrix$2(leaf, checkAutoLayout, waitAutoLayout);
4817
+ updateMatrix$1(leaf, checkAutoLayout, waitAutoLayout);
4805
4818
  if (leaf.isBranch) {
4806
4819
  const {children: children} = leaf;
4807
4820
  for (let i = 0, len = children.length; i < len; i++) {
@@ -4822,9 +4835,10 @@ const LeafHelper = {
4822
4835
  if (layout.matrixChanged) leaf.__updateLocalMatrix();
4823
4836
  if (!layout.waitAutoLayout) leaf.__updateWorldMatrix();
4824
4837
  },
4825
- updateBounds(leaf) {
4838
+ updateBounds(leaf, noUpdateSize) {
4826
4839
  const layout = leaf.__layout;
4827
4840
  if (layout.boundsChanged) leaf.__updateLocalBounds();
4841
+ if (noUpdateSize) layout.resized = undefined;
4828
4842
  if (!layout.waitAutoLayout) leaf.__updateWorldBounds();
4829
4843
  },
4830
4844
  updateAllWorldOpacity(leaf) {
@@ -4847,7 +4861,7 @@ const LeafHelper = {
4847
4861
  }
4848
4862
  },
4849
4863
  updateAllChange(leaf) {
4850
- updateChange$1(leaf);
4864
+ updateChange(leaf);
4851
4865
  if (leaf.isBranch) {
4852
4866
  const {children: children} = leaf;
4853
4867
  for (let i = 0, len = children.length; i < len; i++) {
@@ -5019,7 +5033,7 @@ const LeafHelper = {
5019
5033
 
5020
5034
  const L = LeafHelper;
5021
5035
 
5022
- const {updateAllMatrix: updateAllMatrix$3, updateMatrix: updateMatrix$2, updateAllWorldOpacity: updateAllWorldOpacity, updateAllChange: updateAllChange$1, updateChange: updateChange$1} = L;
5036
+ const {updateAllMatrix: updateAllMatrix$3, updateMatrix: updateMatrix$1, updateAllWorldOpacity: updateAllWorldOpacity, updateAllChange: updateAllChange$1, updateChange: updateChange} = L;
5023
5037
 
5024
5038
  function getTempLocal(t, worldPoint) {
5025
5039
  t.updateLayout();
@@ -5065,7 +5079,7 @@ function checkMask(target, index) {
5065
5079
  return findMask < 0 ? null : (findMask && (findMask = -1), true);
5066
5080
  }
5067
5081
 
5068
- const {updateBounds: updateBounds$3} = LeafHelper;
5082
+ const {updateBounds: updateBounds$2} = LeafHelper;
5069
5083
 
5070
5084
  const BranchHelper = {
5071
5085
  sort(a, b) {
@@ -5126,10 +5140,10 @@ const BranchHelper = {
5126
5140
  branch = branchStack[i];
5127
5141
  children = branch.children;
5128
5142
  for (let j = 0, len = children.length; j < len; j++) {
5129
- updateBounds$3(children[j]);
5143
+ updateBounds$2(children[j]);
5130
5144
  }
5131
5145
  if (exclude && exclude === branch) continue;
5132
- updateBounds$3(branch);
5146
+ updateBounds$2(branch);
5133
5147
  }
5134
5148
  },
5135
5149
  move(branch, x, y) {
@@ -5191,7 +5205,7 @@ const WaitHelper = {
5191
5205
  }
5192
5206
  };
5193
5207
 
5194
- const {getRelativeWorld: getRelativeWorld$1, updateBounds: updateBounds$2} = LeafHelper;
5208
+ const {getRelativeWorld: getRelativeWorld$1, updateBounds: updateBounds$1} = LeafHelper;
5195
5209
 
5196
5210
  const {toOuterOf: toOuterOf$3, getPoints: getPoints, copy: copy$4} = BoundsHelper;
5197
5211
 
@@ -5299,7 +5313,7 @@ class LeafLayout {
5299
5313
  }
5300
5314
  update() {
5301
5315
  const {leaf: leaf} = this, {leafer: leafer} = leaf;
5302
- if (leaf.isApp) return updateBounds$2(leaf);
5316
+ if (leaf.isApp) return updateBounds$1(leaf);
5303
5317
  if (leafer) {
5304
5318
  if (leafer.ready) leafer.watcher.changed && leafer.layouter.layout(); else leafer.start();
5305
5319
  } else {
@@ -6036,9 +6050,12 @@ const LeafDataProxy = {
6036
6050
  }
6037
6051
  },
6038
6052
  emitPropertyEvent(type, name, oldValue, newValue) {
6039
- const event = new PropertyEvent(type, this, name, oldValue, newValue);
6040
- this.isLeafer || this.hasEvent(type) && this.emitEvent(event);
6041
- this.leafer.emitEvent(event);
6053
+ const {leafer: leafer} = this;
6054
+ if (leafer.config.trackChanges || leafer.zoomLayer === this) {
6055
+ const event = new PropertyEvent(type, this, name, oldValue, newValue);
6056
+ this.isLeafer || this.hasEvent(type) && this.emitEvent(event);
6057
+ leafer.emitEvent(event);
6058
+ } else leafer.watcher.add(this);
6042
6059
  },
6043
6060
  __realSetAttr(name, newValue) {
6044
6061
  const data = this.__;
@@ -6083,9 +6100,9 @@ const LeafMatrix = {
6083
6100
  }
6084
6101
  };
6085
6102
 
6086
- const {updateMatrix: updateMatrix$1, updateAllMatrix: updateAllMatrix$2} = LeafHelper;
6103
+ const {updateMatrix: updateMatrix, updateAllMatrix: updateAllMatrix$2} = LeafHelper;
6087
6104
 
6088
- const {updateBounds: updateBounds$1} = BranchHelper;
6105
+ const {updateBounds: updateBounds} = BranchHelper;
6089
6106
 
6090
6107
  const {toOuterOf: toOuterOf$2, copyAndSpread: copyAndSpread$2, copy: copy$3} = BoundsHelper;
6091
6108
 
@@ -6188,14 +6205,14 @@ const LeafBounds = {
6188
6205
  if (this.__layout.childrenSortChanged) this.__updateSortChildren();
6189
6206
  if (this.__layout.boxChanged) this.__updateFlowLayout();
6190
6207
  updateAllMatrix$2(this);
6191
- updateBounds$1(this, this);
6208
+ updateBounds(this, this);
6192
6209
  if (this.__.__autoSide) this.__updateBoxBounds(true);
6193
6210
  } else {
6194
6211
  updateAllMatrix$2(this);
6195
- updateBounds$1(this, this);
6212
+ updateBounds(this, this);
6196
6213
  }
6197
6214
  } else {
6198
- updateMatrix$1(this);
6215
+ updateMatrix(this);
6199
6216
  }
6200
6217
  },
6201
6218
  __updateNaturalSize() {
@@ -6868,9 +6885,12 @@ let Branch = class Branch extends Leaf {
6868
6885
  if (this.isFrame) child.__bindFrame(null);
6869
6886
  }
6870
6887
  __emitChildEvent(type, child) {
6871
- const event = new ChildEvent(type, child, this);
6872
- if (this.hasEvent(type) && !this.isLeafer) this.emitEvent(event);
6873
- this.leafer.emitEvent(event);
6888
+ const {leafer: leafer} = this;
6889
+ if (leafer.config.trackChanges || leafer.zoomLayer === this) {
6890
+ const event = new ChildEvent(type, child, this);
6891
+ if (this.hasEvent(type) && !this.isLeafer) this.emitEvent(event);
6892
+ leafer.emitEvent(event);
6893
+ } else leafer.watcher.addChild(child, this, type);
6874
6894
  }
6875
6895
  };
6876
6896
 
@@ -7023,7 +7043,7 @@ class LeafLevelList {
7023
7043
  }
7024
7044
  }
7025
7045
 
7026
- const version = "2.2.5";
7046
+ const version = "2.2.7";
7027
7047
 
7028
7048
  const debug$5 = Debug.get("LeaferCanvas");
7029
7049
 
@@ -7351,6 +7371,7 @@ class Watcher {
7351
7371
  }
7352
7372
  constructor(target, userConfig) {
7353
7373
  this.totalTimes = 0;
7374
+ this.changed = 0;
7354
7375
  this.config = {};
7355
7376
  this.__updatedList = new LeafList;
7356
7377
  this.target = target;
@@ -7370,8 +7391,10 @@ class Watcher {
7370
7391
  this.disabled = true;
7371
7392
  }
7372
7393
  update() {
7373
- this.changed = true;
7374
- if (this.running) this.target.emit(RenderEvent.REQUEST);
7394
+ if (this.changed < 100) {
7395
+ this.changed++;
7396
+ if (this.running) this.target.emit(RenderEvent.REQUEST);
7397
+ }
7375
7398
  }
7376
7399
  __onAttrChange(event) {
7377
7400
  this.add(event.target);
@@ -7380,18 +7403,21 @@ class Watcher {
7380
7403
  if (this.config.usePartLayout) this.__updatedList.add(leaf);
7381
7404
  this.update();
7382
7405
  }
7383
- __onChildEvent(event) {
7406
+ addChild(child, parent, eventType) {
7384
7407
  if (this.config.usePartLayout) {
7385
- if (event.type === ChildEvent.ADD) {
7408
+ if (eventType === ChildEvent.ADD) {
7386
7409
  this.hasAdd = true;
7387
- this.__pushChild(event.child);
7410
+ this.__pushChild(child);
7388
7411
  } else {
7389
7412
  this.hasRemove = true;
7390
- this.__updatedList.add(event.parent);
7413
+ this.__updatedList.add(parent);
7391
7414
  }
7392
7415
  }
7393
7416
  this.update();
7394
7417
  }
7418
+ __onChildEvent(event) {
7419
+ this.addChild(event.child, event.parent, event.type);
7420
+ }
7395
7421
  __pushChild(child) {
7396
7422
  this.__updatedList.add(child);
7397
7423
  if (child.isBranch) this.__loopChildren(child);
@@ -7406,7 +7432,8 @@ class Watcher {
7406
7432
  }));
7407
7433
  this.__updatedList = new LeafList;
7408
7434
  this.totalTimes++;
7409
- this.changed = this.hasVisible = this.hasRemove = this.hasAdd = false;
7435
+ this.hasVisible = this.hasRemove = this.hasAdd = false;
7436
+ this.changed = 0;
7410
7437
  }
7411
7438
  __listenEvents() {
7412
7439
  this.__eventIds = [ this.target.on_([ [ PropertyEvent.CHANGE, this.__onAttrChange, this ], [ [ ChildEvent.ADD, ChildEvent.REMOVE ], this.__onChildEvent, this ], [ WatchEvent.REQUEST, this.__onRquestData, this ] ]) ];
@@ -7427,47 +7454,57 @@ const {updateAllMatrix: updateAllMatrix$1, updateBounds: updateOneBounds, update
7427
7454
 
7428
7455
  const {pushAllChildBranch: pushAllChildBranch, pushAllParent: pushAllParent} = BranchHelper;
7429
7456
 
7430
- function updateMatrix(updateList, levelList) {
7431
- let layout;
7432
- updateList.list.forEach(leaf => {
7433
- layout = leaf.__layout;
7434
- if (levelList.without(leaf) && !layout.proxyZoom) {
7435
- if (layout.matrixChanged) {
7436
- updateAllMatrix$1(leaf, true);
7437
- levelList.add(leaf);
7438
- if (leaf.isBranch) pushAllChildBranch(leaf, levelList);
7439
- pushAllParent(leaf, levelList);
7440
- } else if (layout.boundsChanged) {
7441
- levelList.add(leaf);
7442
- if (leaf.isBranch) leaf.__tempNumber = 0;
7443
- pushAllParent(leaf, levelList);
7457
+ const LayouterHelper = {
7458
+ updateMatrix(updateList, levelList) {
7459
+ let index = 0, leaf, layout;
7460
+ const {list: list} = updateList;
7461
+ while (index < list.length) {
7462
+ leaf = list[index];
7463
+ layout = leaf.__layout;
7464
+ if (levelList.without(leaf) && !layout.proxyZoom) {
7465
+ if (layout.matrixChanged) {
7466
+ updateAllMatrix$1(leaf, true);
7467
+ if (leaf.isBranch) pushAllChildBranch(leaf, levelList);
7468
+ push(leaf, levelList);
7469
+ } else if (layout.boundsChanged) {
7470
+ if (leaf.isBranch) leaf.__tempNumber = 0;
7471
+ push(leaf, levelList);
7472
+ }
7444
7473
  }
7474
+ index++;
7445
7475
  }
7446
- });
7447
- }
7448
-
7449
- function updateBounds(boundsList) {
7450
- let list, branch, children;
7451
- boundsList.sort(true);
7452
- boundsList.levels.forEach(level => {
7453
- list = boundsList.levelMap[level];
7454
- for (let i = 0, len = list.length; i < len; i++) {
7455
- branch = list[i];
7456
- if (branch.isBranch && branch.__tempNumber) {
7457
- children = branch.children;
7458
- for (let j = 0, jLen = children.length; j < jLen; j++) {
7459
- if (!children[j].isBranch) {
7460
- updateOneBounds(children[j]);
7476
+ },
7477
+ updateBounds(boundsList) {
7478
+ let index = 0, level, list, branch, children;
7479
+ const {levels: levels, levelMap: levelMap} = boundsList;
7480
+ boundsList.sort(true);
7481
+ while (index < levels.length) {
7482
+ level = levels[index];
7483
+ list = levelMap[level];
7484
+ for (let i = 0, len = list.length; i < len; i++) {
7485
+ branch = list[i];
7486
+ if (branch.isBranch && branch.__tempNumber) {
7487
+ children = branch.children;
7488
+ for (let j = 0, jLen = children.length; j < jLen; j++) {
7489
+ if (!children[j].isBranch) {
7490
+ updateOneBounds(children[j]);
7491
+ }
7461
7492
  }
7462
7493
  }
7494
+ updateOneBounds(branch);
7463
7495
  }
7464
- updateOneBounds(branch);
7496
+ index++;
7465
7497
  }
7466
- });
7467
- }
7498
+ },
7499
+ updateChange(updateList) {
7500
+ updateList.list.forEach(updateOneChange);
7501
+ },
7502
+ push: push
7503
+ };
7468
7504
 
7469
- function updateChange(updateList) {
7470
- updateList.list.forEach(updateOneChange);
7505
+ function push(leaf, levelList) {
7506
+ levelList.add(leaf);
7507
+ pushAllParent(leaf, levelList);
7471
7508
  }
7472
7509
 
7473
7510
  const {worldBounds: worldBounds} = LeafBoundsHelper;
@@ -7574,9 +7611,9 @@ class Layouter {
7574
7611
  target.emitEvent(new LayoutEvent(BEFORE, blocks, this.times));
7575
7612
  this.extraBlock = null;
7576
7613
  updateList.sort();
7577
- updateMatrix(updateList, this.__levelList);
7578
- updateBounds(this.__levelList);
7579
- updateChange(updateList);
7614
+ LayouterHelper.updateMatrix(updateList, this.__levelList);
7615
+ LayouterHelper.updateBounds(this.__levelList);
7616
+ LayouterHelper.updateChange(updateList);
7580
7617
  if (this.extraBlock) blocks.push(this.extraBlock);
7581
7618
  blocks.forEach(item => item.setAfter());
7582
7619
  target.emitEvent(new LayoutEvent(LAYOUT, blocks, this.times));
@@ -7606,11 +7643,16 @@ class Layouter {
7606
7643
  if (target.isBranch) BranchHelper.updateBounds(target); else LeafHelper.updateBounds(target);
7607
7644
  updateAllChange(target);
7608
7645
  }
7609
- addExtra(leaf) {
7646
+ addExtra(leaf, updateBounds) {
7610
7647
  if (!this.__updatedList.has(leaf)) {
7611
7648
  const {updatedList: updatedList, beforeBounds: beforeBounds} = this.extraBlock || (this.extraBlock = new LayoutBlockData([]));
7612
7649
  updatedList.length ? beforeBounds.add(leaf.__world) : beforeBounds.set(leaf.__world);
7613
7650
  updatedList.add(leaf);
7651
+ if (updateBounds) {
7652
+ const list = this.__levelList;
7653
+ LayouterHelper.push(leaf, list);
7654
+ list.sort(true);
7655
+ }
7614
7656
  }
7615
7657
  }
7616
7658
  createBlock(data) {
@@ -7935,7 +7977,7 @@ class Picker {
7935
7977
  for (let i = 0, len = list.length; i < len; i++) {
7936
7978
  find = list[i];
7937
7979
  if (ignoreHittable || LeafHelper.worldHittable(find)) {
7938
- this.hitChild(find, find.hitThrough ? this.point : point);
7980
+ this.hitChild(find, find.hitThrough ? this.point : point, find.mask && find.parent && find.parent.__onlyHitMask);
7939
7981
  if (findList.length) {
7940
7982
  if (find.isBranchLeaf && list.some(item => item !== find && LeafHelper.hasParent(item, find))) {
7941
7983
  findList.reset();
@@ -8034,7 +8076,7 @@ class Picker {
8034
8076
  }
8035
8077
  const leaf = proxy || child, {hitThrough: hitThrough} = child, {findList: findList} = this;
8036
8078
  if (hitThrough) {
8037
- const index = findList.list.findIndex(item => item[hitThrough] === child[hitThrough]);
8079
+ const index = findList.list.findIndex(item => hitThrough === "parent" ? LeafHelper.hasParent(item.parent, child.parent) : item[hitThrough] === child[hitThrough]);
8038
8080
  if (index > 0) return findList.addAt(leaf, index);
8039
8081
  }
8040
8082
  findList.add(leaf);
@@ -8567,7 +8609,7 @@ const UIRender = {
8567
8609
  }
8568
8610
  if (data.__useEffect) {
8569
8611
  const {shadow: shadow, fill: fill, stroke: stroke} = data, otherEffect = data.innerShadow || data.blur || data.backgroundBlur || data.filter;
8570
- stintSet$2(data, "__isFastShadow", shadow && !otherEffect && shadow.length < 2 && !shadow[0].spread && !Effect.isTransformShadow(shadow[0]) && fill && !data.__isTransparentFill && !(isArray(fill) && fill.length > 1) && (this.useFastShadow || !stroke || stroke && data.strokeAlign === "inside"));
8612
+ stintSet$2(data, "__isFastShadow", shadow && !otherEffect && shadow.length < 2 && !shadow[0].spread && !Effect.isTransformShadow(shadow[0]) && !(shadow[0].blendMode && shadow[0].blendMode !== "pass-through") && fill && !data.__isTransparentFill && !(isArray(fill) && fill.length > 1) && (this.useFastShadow || !stroke || stroke && data.strokeAlign === "inside"));
8571
8613
  data.__useEffect = !!(shadow || otherEffect);
8572
8614
  }
8573
8615
  data.__checkSingle();
@@ -9062,6 +9104,7 @@ let Leafer = Leafer_1 = class Leafer extends Group {
9062
9104
  start: true,
9063
9105
  hittable: true,
9064
9106
  smooth: true,
9107
+ trackChanges: true,
9065
9108
  lazySpeard: 100
9066
9109
  };
9067
9110
  this.leafs = 0;
@@ -9625,7 +9668,7 @@ let Polygon = class Polygon extends UI {
9625
9668
  const data = this.__;
9626
9669
  const path = data.path = [];
9627
9670
  if (data.points) {
9628
- drawPoints$1(path, data.points, data.curve, data.closed);
9671
+ drawPoints$1(path, data.points, data.curve, data.closed, data);
9629
9672
  } else {
9630
9673
  const {width: width, height: height, sides: sides, startAngle: startAngle} = data;
9631
9674
  const rx = width / 2, ry = height / 2;
@@ -9717,7 +9760,7 @@ let Line = class Line extends UI {
9717
9760
  const data = this.__;
9718
9761
  const path = data.path = [];
9719
9762
  if (data.points) {
9720
- drawPoints(path, data.points, data.curve, data.closed);
9763
+ drawPoints(path, data.points, data.curve, data.closed, data);
9721
9764
  } else {
9722
9765
  moveTo(path, 0, 0);
9723
9766
  lineTo(path, this.width, 0);
@@ -12329,7 +12372,7 @@ function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds
12329
12372
  data.__naturalHeight = image.height / data.pixelRatio;
12330
12373
  if (data.__autoSide) {
12331
12374
  ui.forceUpdate();
12332
- LeafHelper.updateBounds(ui);
12375
+ LeafHelper.updateBounds(ui, true);
12333
12376
  ui.__layout.boundsChanged = true;
12334
12377
  if (ui.__proxyData) {
12335
12378
  ui.setProxyAttr("width", data.width);
@@ -13608,4 +13651,4 @@ Object.assign(Creator, {
13608
13651
 
13609
13652
  useCanvas();
13610
13653
 
13611
- export { AlignHelper, 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, FourNumberHelper, Frame, FrameData, Group, GroupData, 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, 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, naturalBoundsType, opacityType, path, pathInputType, pathType, pen, positionType, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleType, scrollType, sortType, strokeType, surfaceType, tempBounds$2 as tempBounds, tempMatrix$2 as tempMatrix, tempPoint$4 as tempPoint, tryToNumber, useCanvas, useModule, version, visibleType, zoomLayerType };
13654
+ export { AlignHelper, 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, FourNumberHelper, Frame, FrameData, Group, GroupData, 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, 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, naturalBoundsType, opacityType, path, pathInputType, pathType, pen, positionType, registerPointsCurve, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleType, scrollType, sortType, strokeType, surfaceType, tempBounds$2 as tempBounds, tempMatrix$2 as tempMatrix, tempPoint$4 as tempPoint, tryToNumber, useCanvas, useModule, version, visibleType, zoomLayerType };