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.
package/dist/web.js CHANGED
@@ -1814,7 +1814,7 @@ var LeaferUI = function(exports) {
1814
1814
  return name;
1815
1815
  }
1816
1816
  const D$5 = Debug;
1817
- const debug$g = Debug.get("RunTime");
1817
+ const debug$h = Debug.get("RunTime");
1818
1818
  const Run = {
1819
1819
  currentId: 0,
1820
1820
  currentName: "",
@@ -1832,7 +1832,7 @@ var LeaferUI = function(exports) {
1832
1832
  const time = R$1.idMap[id], name = R$1.nameMap[id];
1833
1833
  const duration = microsecond ? (performance.now() - time) / 1e3 : Date.now() - time;
1834
1834
  R$1.idMap[id] = R$1.nameMap[id] = R$1.nameToIdMap[name] = undefined;
1835
- debug$g.log(name, duration, "ms");
1835
+ debug$h.log(name, duration, "ms");
1836
1836
  },
1837
1837
  endOfName(name, microsecond) {
1838
1838
  const id = R$1.nameToIdMap[name];
@@ -1862,17 +1862,17 @@ var LeaferUI = function(exports) {
1862
1862
  return Plugin.need("editor");
1863
1863
  }
1864
1864
  };
1865
- const debug$f = Debug.get("UICreator");
1865
+ const debug$g = Debug.get("UICreator");
1866
1866
  const UICreator = {
1867
1867
  list: {},
1868
1868
  register(UI) {
1869
1869
  const {__tag: tag} = UI.prototype;
1870
- if (list$1[tag]) debug$f.repeat(tag);
1870
+ if (list$1[tag]) debug$g.repeat(tag);
1871
1871
  list$1[tag] = UI;
1872
1872
  },
1873
1873
  get(tag, data, x, y, width, height) {
1874
1874
  if (!list$1[tag]) {
1875
- debug$f.warn("not register " + tag);
1875
+ debug$g.warn("not register " + tag);
1876
1876
  return undefined;
1877
1877
  }
1878
1878
  const ui = new list$1[tag](data);
@@ -1886,14 +1886,14 @@ var LeaferUI = function(exports) {
1886
1886
  }
1887
1887
  };
1888
1888
  const {list: list$1} = UICreator;
1889
- const debug$e = Debug.get("EventCreator");
1889
+ const debug$f = Debug.get("EventCreator");
1890
1890
  const EventCreator = {
1891
1891
  nameList: {},
1892
1892
  register(Event) {
1893
1893
  let name;
1894
1894
  Object.keys(Event).forEach(key => {
1895
1895
  name = Event[key];
1896
- if (isString(name)) nameList[name] && debug$e.repeat(name), nameList[name] = Event;
1896
+ if (isString(name)) nameList[name] && debug$f.repeat(name), nameList[name] = Event;
1897
1897
  });
1898
1898
  },
1899
1899
  changeName(oldName, newName) {
@@ -2807,7 +2807,7 @@ var LeaferUI = function(exports) {
2807
2807
  const {M: M$4, m: m, L: L$5, l: l, H: H, h: h, V: V, v: v, C: C$3, c: c, S: S, s: s, Q: Q$3, q: q, T: T, t: t, A: A, a: a, Z: Z$4, z: z, N: N$3, D: D$4, X: X$3, G: G$3, F: F$4, O: O$3, P: P$3, U: U$3} = PathCommandMap;
2808
2808
  const {rect: rect$3, roundRect: roundRect$2, arcTo: arcTo$3, arc: arc$3, ellipse: ellipse$4, quadraticCurveTo: quadraticCurveTo$1} = BezierHelper;
2809
2809
  const {ellipticalArc: ellipticalArc} = EllipseHelper;
2810
- const debug$d = Debug.get("PathConvert");
2810
+ const debug$e = Debug.get("PathConvert");
2811
2811
  const setEndPoint$1 = {};
2812
2812
  const PathConvert = {
2813
2813
  current: {
@@ -3072,7 +3072,7 @@ var LeaferUI = function(exports) {
3072
3072
  break;
3073
3073
 
3074
3074
  default:
3075
- debug$d.error(`command: ${command} [index:${i}]`, old);
3075
+ debug$e.error(`command: ${command} [index:${i}]`, old);
3076
3076
  return data;
3077
3077
  }
3078
3078
  lastCommand = command;
@@ -3129,7 +3129,9 @@ var LeaferUI = function(exports) {
3129
3129
  const {getMinDistanceFrom: getMinDistanceFrom, getRadianFrom: getRadianFrom} = PointHelper;
3130
3130
  const {tan: tan, min: min$1, abs: abs$4} = Math;
3131
3131
  const startPoint = {};
3132
+ const debug$d = Debug.get("PointsCurve");
3132
3133
  const PathCommandDataHelper = {
3134
+ pointsCurveList: {},
3133
3135
  beginPath(data) {
3134
3136
  data.length = 0;
3135
3137
  },
@@ -3199,11 +3201,19 @@ var LeaferUI = function(exports) {
3199
3201
  data.push(M$3, startPoint.x, startPoint.y);
3200
3202
  arc$2(data, x, y, radius, startAngle, endAngle, anticlockwise);
3201
3203
  },
3202
- drawPoints(data, points, curve, close) {
3203
- BezierHelper.points(data, points, curve, close);
3204
+ drawPoints(data, points, curve, close, options) {
3205
+ let type = "Q";
3206
+ if (isObject(curve)) type = curve.type, curve = curve.value;
3207
+ if (!pointsCurveList[type]) debug$d.warn("not found:", type), type = "Q";
3208
+ pointsCurveList[type](data, points, curve, close, options);
3204
3209
  }
3205
3210
  };
3206
- const {ellipse: ellipse$3, arc: arc$2} = PathCommandDataHelper;
3211
+ const {ellipse: ellipse$3, arc: arc$2, pointsCurveList: pointsCurveList} = PathCommandDataHelper;
3212
+ function registerPointsCurve(type, fn) {
3213
+ if (pointsCurveList[type]) debug$d.repeat(type);
3214
+ pointsCurveList[type] = fn;
3215
+ }
3216
+ registerPointsCurve("Q", BezierHelper.points);
3207
3217
  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;
3208
3218
  class PathCreator {
3209
3219
  set path(value) {
@@ -4503,7 +4513,7 @@ var LeaferUI = function(exports) {
4503
4513
  const LeafHelper = {
4504
4514
  updateAllMatrix(leaf, checkAutoLayout, waitAutoLayout) {
4505
4515
  if (checkAutoLayout && leaf.__hasAutoLayout && leaf.__layout.matrixChanged) waitAutoLayout = true;
4506
- updateMatrix$2(leaf, checkAutoLayout, waitAutoLayout);
4516
+ updateMatrix$1(leaf, checkAutoLayout, waitAutoLayout);
4507
4517
  if (leaf.isBranch) {
4508
4518
  const {children: children} = leaf;
4509
4519
  for (let i = 0, len = children.length; i < len; i++) {
@@ -4524,9 +4534,10 @@ var LeaferUI = function(exports) {
4524
4534
  if (layout.matrixChanged) leaf.__updateLocalMatrix();
4525
4535
  if (!layout.waitAutoLayout) leaf.__updateWorldMatrix();
4526
4536
  },
4527
- updateBounds(leaf) {
4537
+ updateBounds(leaf, noUpdateSize) {
4528
4538
  const layout = leaf.__layout;
4529
4539
  if (layout.boundsChanged) leaf.__updateLocalBounds();
4540
+ if (noUpdateSize) layout.resized = undefined;
4530
4541
  if (!layout.waitAutoLayout) leaf.__updateWorldBounds();
4531
4542
  },
4532
4543
  updateAllWorldOpacity(leaf) {
@@ -4549,7 +4560,7 @@ var LeaferUI = function(exports) {
4549
4560
  }
4550
4561
  },
4551
4562
  updateAllChange(leaf) {
4552
- updateChange$1(leaf);
4563
+ updateChange(leaf);
4553
4564
  if (leaf.isBranch) {
4554
4565
  const {children: children} = leaf;
4555
4566
  for (let i = 0, len = children.length; i < len; i++) {
@@ -4719,7 +4730,7 @@ var LeaferUI = function(exports) {
4719
4730
  }
4720
4731
  };
4721
4732
  const L = LeafHelper;
4722
- const {updateAllMatrix: updateAllMatrix$3, updateMatrix: updateMatrix$2, updateAllWorldOpacity: updateAllWorldOpacity, updateAllChange: updateAllChange$1, updateChange: updateChange$1} = L;
4733
+ const {updateAllMatrix: updateAllMatrix$3, updateMatrix: updateMatrix$1, updateAllWorldOpacity: updateAllWorldOpacity, updateAllChange: updateAllChange$1, updateChange: updateChange} = L;
4723
4734
  function getTempLocal(t, worldPoint) {
4724
4735
  t.updateLayout();
4725
4736
  return t.parent ? PointHelper.tempToInnerOf(worldPoint, t.parent.scrollWorldTransform) : worldPoint;
@@ -4760,7 +4771,7 @@ var LeaferUI = function(exports) {
4760
4771
  if (target.__.mask) findMask = 1;
4761
4772
  return findMask < 0 ? null : (findMask && (findMask = -1), true);
4762
4773
  }
4763
- const {updateBounds: updateBounds$3} = LeafHelper;
4774
+ const {updateBounds: updateBounds$2} = LeafHelper;
4764
4775
  const BranchHelper = {
4765
4776
  sort(a, b) {
4766
4777
  return a.__.zIndex === b.__.zIndex ? a.__tempNumber - b.__tempNumber : a.__.zIndex - b.__.zIndex;
@@ -4820,10 +4831,10 @@ var LeaferUI = function(exports) {
4820
4831
  branch = branchStack[i];
4821
4832
  children = branch.children;
4822
4833
  for (let j = 0, len = children.length; j < len; j++) {
4823
- updateBounds$3(children[j]);
4834
+ updateBounds$2(children[j]);
4824
4835
  }
4825
4836
  if (exclude && exclude === branch) continue;
4826
- updateBounds$3(branch);
4837
+ updateBounds$2(branch);
4827
4838
  }
4828
4839
  },
4829
4840
  move(branch, x, y) {
@@ -4882,7 +4893,7 @@ var LeaferUI = function(exports) {
4882
4893
  }
4883
4894
  }
4884
4895
  };
4885
- const {getRelativeWorld: getRelativeWorld$1, updateBounds: updateBounds$2} = LeafHelper;
4896
+ const {getRelativeWorld: getRelativeWorld$1, updateBounds: updateBounds$1} = LeafHelper;
4886
4897
  const {toOuterOf: toOuterOf$3, getPoints: getPoints, copy: copy$4} = BoundsHelper;
4887
4898
  const localContent = "_localContentBounds";
4888
4899
  const worldContent = "_worldContentBounds", worldBox = "_worldBoxBounds", worldStroke = "_worldStrokeBounds";
@@ -4986,7 +4997,7 @@ var LeaferUI = function(exports) {
4986
4997
  }
4987
4998
  update() {
4988
4999
  const {leaf: leaf} = this, {leafer: leafer} = leaf;
4989
- if (leaf.isApp) return updateBounds$2(leaf);
5000
+ if (leaf.isApp) return updateBounds$1(leaf);
4990
5001
  if (leafer) {
4991
5002
  if (leafer.ready) leafer.watcher.changed && leafer.layouter.layout(); else leafer.start();
4992
5003
  } else {
@@ -5648,9 +5659,12 @@ var LeaferUI = function(exports) {
5648
5659
  }
5649
5660
  },
5650
5661
  emitPropertyEvent(type, name, oldValue, newValue) {
5651
- const event = new PropertyEvent(type, this, name, oldValue, newValue);
5652
- this.isLeafer || this.hasEvent(type) && this.emitEvent(event);
5653
- this.leafer.emitEvent(event);
5662
+ const {leafer: leafer} = this;
5663
+ if (leafer.config.trackChanges || leafer.zoomLayer === this) {
5664
+ const event = new PropertyEvent(type, this, name, oldValue, newValue);
5665
+ this.isLeafer || this.hasEvent(type) && this.emitEvent(event);
5666
+ leafer.emitEvent(event);
5667
+ } else leafer.watcher.add(this);
5654
5668
  },
5655
5669
  __realSetAttr(name, newValue) {
5656
5670
  const data = this.__;
@@ -5691,8 +5705,8 @@ var LeaferUI = function(exports) {
5691
5705
  this.__layout.matrixChanged = undefined;
5692
5706
  }
5693
5707
  };
5694
- const {updateMatrix: updateMatrix$1, updateAllMatrix: updateAllMatrix$2} = LeafHelper;
5695
- const {updateBounds: updateBounds$1} = BranchHelper;
5708
+ const {updateMatrix: updateMatrix, updateAllMatrix: updateAllMatrix$2} = LeafHelper;
5709
+ const {updateBounds: updateBounds} = BranchHelper;
5696
5710
  const {toOuterOf: toOuterOf$2, copyAndSpread: copyAndSpread$2, copy: copy$3} = BoundsHelper;
5697
5711
  const {toBounds: toBounds} = PathBounds;
5698
5712
  const LeafBounds = {
@@ -5792,14 +5806,14 @@ var LeaferUI = function(exports) {
5792
5806
  if (this.__layout.childrenSortChanged) this.__updateSortChildren();
5793
5807
  if (this.__layout.boxChanged) this.__updateFlowLayout();
5794
5808
  updateAllMatrix$2(this);
5795
- updateBounds$1(this, this);
5809
+ updateBounds(this, this);
5796
5810
  if (this.__.__autoSide) this.__updateBoxBounds(true);
5797
5811
  } else {
5798
5812
  updateAllMatrix$2(this);
5799
- updateBounds$1(this, this);
5813
+ updateBounds(this, this);
5800
5814
  }
5801
5815
  } else {
5802
- updateMatrix$1(this);
5816
+ updateMatrix(this);
5803
5817
  }
5804
5818
  },
5805
5819
  __updateNaturalSize() {
@@ -6455,9 +6469,12 @@ var LeaferUI = function(exports) {
6455
6469
  if (this.isFrame) child.__bindFrame(null);
6456
6470
  }
6457
6471
  __emitChildEvent(type, child) {
6458
- const event = new ChildEvent(type, child, this);
6459
- if (this.hasEvent(type) && !this.isLeafer) this.emitEvent(event);
6460
- this.leafer.emitEvent(event);
6472
+ const {leafer: leafer} = this;
6473
+ if (leafer.config.trackChanges || leafer.zoomLayer === this) {
6474
+ const event = new ChildEvent(type, child, this);
6475
+ if (this.hasEvent(type) && !this.isLeafer) this.emitEvent(event);
6476
+ leafer.emitEvent(event);
6477
+ } else leafer.watcher.addChild(child, this, type);
6461
6478
  }
6462
6479
  };
6463
6480
  exports.Branch = __decorate([ useModule(BranchRender) ], exports.Branch);
@@ -6606,7 +6623,7 @@ var LeaferUI = function(exports) {
6606
6623
  this.levelMap = null;
6607
6624
  }
6608
6625
  }
6609
- const version = "2.2.5";
6626
+ const version = "2.2.7";
6610
6627
  const debug$5 = Debug.get("LeaferCanvas");
6611
6628
  class LeaferCanvas extends LeaferCanvasBase {
6612
6629
  set zIndex(zIndex) {
@@ -6920,6 +6937,7 @@ var LeaferUI = function(exports) {
6920
6937
  }
6921
6938
  constructor(target, userConfig) {
6922
6939
  this.totalTimes = 0;
6940
+ this.changed = 0;
6923
6941
  this.config = {};
6924
6942
  this.__updatedList = new LeafList;
6925
6943
  this.target = target;
@@ -6939,8 +6957,10 @@ var LeaferUI = function(exports) {
6939
6957
  this.disabled = true;
6940
6958
  }
6941
6959
  update() {
6942
- this.changed = true;
6943
- if (this.running) this.target.emit(RenderEvent.REQUEST);
6960
+ if (this.changed < 100) {
6961
+ this.changed++;
6962
+ if (this.running) this.target.emit(RenderEvent.REQUEST);
6963
+ }
6944
6964
  }
6945
6965
  __onAttrChange(event) {
6946
6966
  this.add(event.target);
@@ -6949,18 +6969,21 @@ var LeaferUI = function(exports) {
6949
6969
  if (this.config.usePartLayout) this.__updatedList.add(leaf);
6950
6970
  this.update();
6951
6971
  }
6952
- __onChildEvent(event) {
6972
+ addChild(child, parent, eventType) {
6953
6973
  if (this.config.usePartLayout) {
6954
- if (event.type === ChildEvent.ADD) {
6974
+ if (eventType === ChildEvent.ADD) {
6955
6975
  this.hasAdd = true;
6956
- this.__pushChild(event.child);
6976
+ this.__pushChild(child);
6957
6977
  } else {
6958
6978
  this.hasRemove = true;
6959
- this.__updatedList.add(event.parent);
6979
+ this.__updatedList.add(parent);
6960
6980
  }
6961
6981
  }
6962
6982
  this.update();
6963
6983
  }
6984
+ __onChildEvent(event) {
6985
+ this.addChild(event.child, event.parent, event.type);
6986
+ }
6964
6987
  __pushChild(child) {
6965
6988
  this.__updatedList.add(child);
6966
6989
  if (child.isBranch) this.__loopChildren(child);
@@ -6975,7 +6998,8 @@ var LeaferUI = function(exports) {
6975
6998
  }));
6976
6999
  this.__updatedList = new LeafList;
6977
7000
  this.totalTimes++;
6978
- this.changed = this.hasVisible = this.hasRemove = this.hasAdd = false;
7001
+ this.hasVisible = this.hasRemove = this.hasAdd = false;
7002
+ this.changed = 0;
6979
7003
  }
6980
7004
  __listenEvents() {
6981
7005
  this.__eventIds = [ this.target.on_([ [ PropertyEvent.CHANGE, this.__onAttrChange, this ], [ [ ChildEvent.ADD, ChildEvent.REMOVE ], this.__onChildEvent, this ], [ WatchEvent.REQUEST, this.__onRquestData, this ] ]) ];
@@ -6993,45 +7017,56 @@ var LeaferUI = function(exports) {
6993
7017
  }
6994
7018
  const {updateAllMatrix: updateAllMatrix$1, updateBounds: updateOneBounds, updateChange: updateOneChange} = LeafHelper;
6995
7019
  const {pushAllChildBranch: pushAllChildBranch, pushAllParent: pushAllParent} = BranchHelper;
6996
- function updateMatrix(updateList, levelList) {
6997
- let layout;
6998
- updateList.list.forEach(leaf => {
6999
- layout = leaf.__layout;
7000
- if (levelList.without(leaf) && !layout.proxyZoom) {
7001
- if (layout.matrixChanged) {
7002
- updateAllMatrix$1(leaf, true);
7003
- levelList.add(leaf);
7004
- if (leaf.isBranch) pushAllChildBranch(leaf, levelList);
7005
- pushAllParent(leaf, levelList);
7006
- } else if (layout.boundsChanged) {
7007
- levelList.add(leaf);
7008
- if (leaf.isBranch) leaf.__tempNumber = 0;
7009
- pushAllParent(leaf, levelList);
7020
+ const LayouterHelper = {
7021
+ updateMatrix(updateList, levelList) {
7022
+ let index = 0, leaf, layout;
7023
+ const {list: list} = updateList;
7024
+ while (index < list.length) {
7025
+ leaf = list[index];
7026
+ layout = leaf.__layout;
7027
+ if (levelList.without(leaf) && !layout.proxyZoom) {
7028
+ if (layout.matrixChanged) {
7029
+ updateAllMatrix$1(leaf, true);
7030
+ if (leaf.isBranch) pushAllChildBranch(leaf, levelList);
7031
+ push(leaf, levelList);
7032
+ } else if (layout.boundsChanged) {
7033
+ if (leaf.isBranch) leaf.__tempNumber = 0;
7034
+ push(leaf, levelList);
7035
+ }
7010
7036
  }
7037
+ index++;
7011
7038
  }
7012
- });
7013
- }
7014
- function updateBounds(boundsList) {
7015
- let list, branch, children;
7016
- boundsList.sort(true);
7017
- boundsList.levels.forEach(level => {
7018
- list = boundsList.levelMap[level];
7019
- for (let i = 0, len = list.length; i < len; i++) {
7020
- branch = list[i];
7021
- if (branch.isBranch && branch.__tempNumber) {
7022
- children = branch.children;
7023
- for (let j = 0, jLen = children.length; j < jLen; j++) {
7024
- if (!children[j].isBranch) {
7025
- updateOneBounds(children[j]);
7039
+ },
7040
+ updateBounds(boundsList) {
7041
+ let index = 0, level, list, branch, children;
7042
+ const {levels: levels, levelMap: levelMap} = boundsList;
7043
+ boundsList.sort(true);
7044
+ while (index < levels.length) {
7045
+ level = levels[index];
7046
+ list = levelMap[level];
7047
+ for (let i = 0, len = list.length; i < len; i++) {
7048
+ branch = list[i];
7049
+ if (branch.isBranch && branch.__tempNumber) {
7050
+ children = branch.children;
7051
+ for (let j = 0, jLen = children.length; j < jLen; j++) {
7052
+ if (!children[j].isBranch) {
7053
+ updateOneBounds(children[j]);
7054
+ }
7026
7055
  }
7027
7056
  }
7057
+ updateOneBounds(branch);
7028
7058
  }
7029
- updateOneBounds(branch);
7059
+ index++;
7030
7060
  }
7031
- });
7032
- }
7033
- function updateChange(updateList) {
7034
- updateList.list.forEach(updateOneChange);
7061
+ },
7062
+ updateChange(updateList) {
7063
+ updateList.list.forEach(updateOneChange);
7064
+ },
7065
+ push: push
7066
+ };
7067
+ function push(leaf, levelList) {
7068
+ levelList.add(leaf);
7069
+ pushAllParent(leaf, levelList);
7035
7070
  }
7036
7071
  const {worldBounds: worldBounds} = LeafBoundsHelper;
7037
7072
  class LayoutBlockData {
@@ -7133,9 +7168,9 @@ var LeaferUI = function(exports) {
7133
7168
  target.emitEvent(new LayoutEvent(BEFORE, blocks, this.times));
7134
7169
  this.extraBlock = null;
7135
7170
  updateList.sort();
7136
- updateMatrix(updateList, this.__levelList);
7137
- updateBounds(this.__levelList);
7138
- updateChange(updateList);
7171
+ LayouterHelper.updateMatrix(updateList, this.__levelList);
7172
+ LayouterHelper.updateBounds(this.__levelList);
7173
+ LayouterHelper.updateChange(updateList);
7139
7174
  if (this.extraBlock) blocks.push(this.extraBlock);
7140
7175
  blocks.forEach(item => item.setAfter());
7141
7176
  target.emitEvent(new LayoutEvent(LAYOUT, blocks, this.times));
@@ -7165,11 +7200,16 @@ var LeaferUI = function(exports) {
7165
7200
  if (target.isBranch) BranchHelper.updateBounds(target); else LeafHelper.updateBounds(target);
7166
7201
  updateAllChange(target);
7167
7202
  }
7168
- addExtra(leaf) {
7203
+ addExtra(leaf, updateBounds) {
7169
7204
  if (!this.__updatedList.has(leaf)) {
7170
7205
  const {updatedList: updatedList, beforeBounds: beforeBounds} = this.extraBlock || (this.extraBlock = new LayoutBlockData([]));
7171
7206
  updatedList.length ? beforeBounds.add(leaf.__world) : beforeBounds.set(leaf.__world);
7172
7207
  updatedList.add(leaf);
7208
+ if (updateBounds) {
7209
+ const list = this.__levelList;
7210
+ LayouterHelper.push(leaf, list);
7211
+ list.sort(true);
7212
+ }
7173
7213
  }
7174
7214
  }
7175
7215
  createBlock(data) {
@@ -7487,7 +7527,7 @@ var LeaferUI = function(exports) {
7487
7527
  for (let i = 0, len = list.length; i < len; i++) {
7488
7528
  find = list[i];
7489
7529
  if (ignoreHittable || LeafHelper.worldHittable(find)) {
7490
- this.hitChild(find, find.hitThrough ? this.point : point);
7530
+ this.hitChild(find, find.hitThrough ? this.point : point, find.mask && find.parent && find.parent.__onlyHitMask);
7491
7531
  if (findList.length) {
7492
7532
  if (find.isBranchLeaf && list.some(item => item !== find && LeafHelper.hasParent(item, find))) {
7493
7533
  findList.reset();
@@ -7586,7 +7626,7 @@ var LeaferUI = function(exports) {
7586
7626
  }
7587
7627
  const leaf = proxy || child, {hitThrough: hitThrough} = child, {findList: findList} = this;
7588
7628
  if (hitThrough) {
7589
- const index = findList.list.findIndex(item => item[hitThrough] === child[hitThrough]);
7629
+ const index = findList.list.findIndex(item => hitThrough === "parent" ? LeafHelper.hasParent(item.parent, child.parent) : item[hitThrough] === child[hitThrough]);
7590
7630
  if (index > 0) return findList.addAt(leaf, index);
7591
7631
  }
7592
7632
  findList.add(leaf);
@@ -8073,7 +8113,7 @@ var LeaferUI = function(exports) {
8073
8113
  }
8074
8114
  if (data.__useEffect) {
8075
8115
  const {shadow: shadow, fill: fill, stroke: stroke} = data, otherEffect = data.innerShadow || data.blur || data.backgroundBlur || data.filter;
8076
- 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"));
8116
+ 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"));
8077
8117
  data.__useEffect = !!(shadow || otherEffect);
8078
8118
  }
8079
8119
  data.__checkSingle();
@@ -8482,6 +8522,7 @@ var LeaferUI = function(exports) {
8482
8522
  start: true,
8483
8523
  hittable: true,
8484
8524
  smooth: true,
8525
+ trackChanges: true,
8485
8526
  lazySpeard: 100
8486
8527
  };
8487
8528
  this.leafs = 0;
@@ -9005,7 +9046,7 @@ var LeaferUI = function(exports) {
9005
9046
  const data = this.__;
9006
9047
  const path = data.path = [];
9007
9048
  if (data.points) {
9008
- drawPoints$1(path, data.points, data.curve, data.closed);
9049
+ drawPoints$1(path, data.points, data.curve, data.closed, data);
9009
9050
  } else {
9010
9051
  const {width: width, height: height, sides: sides, startAngle: startAngle} = data;
9011
9052
  const rx = width / 2, ry = height / 2;
@@ -9080,7 +9121,7 @@ var LeaferUI = function(exports) {
9080
9121
  const data = this.__;
9081
9122
  const path = data.path = [];
9082
9123
  if (data.points) {
9083
- drawPoints(path, data.points, data.curve, data.closed);
9124
+ drawPoints(path, data.points, data.curve, data.closed, data);
9084
9125
  } else {
9085
9126
  moveTo(path, 0, 0);
9086
9127
  lineTo(path, this.width, 0);
@@ -11475,7 +11516,7 @@ var LeaferUI = function(exports) {
11475
11516
  data.__naturalHeight = image.height / data.pixelRatio;
11476
11517
  if (data.__autoSide) {
11477
11518
  ui.forceUpdate();
11478
- LeafHelper.updateBounds(ui);
11519
+ LeafHelper.updateBounds(ui, true);
11479
11520
  ui.__layout.boundsChanged = true;
11480
11521
  if (ui.__proxyData) {
11481
11522
  ui.setProxyAttr("width", data.width);
@@ -12667,6 +12708,7 @@ var LeaferUI = function(exports) {
12667
12708
  exports.Keyboard = Keyboard;
12668
12709
  exports.LayoutEvent = LayoutEvent;
12669
12710
  exports.Layouter = Layouter;
12711
+ exports.LayouterHelper = LayouterHelper;
12670
12712
  exports.LeafBounds = LeafBounds;
12671
12713
  exports.LeafBoundsHelper = LeafBoundsHelper;
12672
12714
  exports.LeafData = LeafData;
@@ -12798,6 +12840,7 @@ var LeaferUI = function(exports) {
12798
12840
  exports.pathType = pathType;
12799
12841
  exports.pen = pen;
12800
12842
  exports.positionType = positionType;
12843
+ exports.registerPointsCurve = registerPointsCurve;
12801
12844
  exports.registerUI = registerUI;
12802
12845
  exports.registerUIEvent = registerUIEvent;
12803
12846
  exports.resizeType = resizeType;