@leafer/core 1.9.1 → 1.9.3

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/lib/core.cjs CHANGED
@@ -478,9 +478,8 @@ const MatrixHelper = {
478
478
  t.e = child.e * a + child.f * c + e;
479
479
  t.f = child.e * b + child.f * d + f;
480
480
  },
481
- multiplyParent(t, parent, to, abcdChanged, childScaleData, scrollData) {
482
- let {e: e, f: f} = t;
483
- if (scrollData) e += scrollData.scrollX, f += scrollData.scrollY;
481
+ multiplyParent(t, parent, to, abcdChanged, childScaleData) {
482
+ const {e: e, f: f} = t;
484
483
  to || (to = t);
485
484
  if (isUndefined(abcdChanged)) abcdChanged = t.a !== 1 || t.b || t.c || t.d !== 1;
486
485
  if (abcdChanged) {
@@ -1193,6 +1192,10 @@ const BoundsHelper = {
1193
1192
  t.x += x;
1194
1193
  t.y += y;
1195
1194
  },
1195
+ scroll(t, data) {
1196
+ t.x += data.scrollX;
1197
+ t.y += data.scrollY;
1198
+ },
1196
1199
  getByMove(t, x, y) {
1197
1200
  t = Object.assign({}, t);
1198
1201
  B.move(t, x, y);
@@ -2139,7 +2142,7 @@ __decorate([ contextMethod() ], Canvas.prototype, "measureText", null);
2139
2142
 
2140
2143
  __decorate([ contextMethod() ], Canvas.prototype, "strokeText", null);
2141
2144
 
2142
- const {copy: copy$5, multiplyParent: multiplyParent$3} = MatrixHelper, {round: round$1} = Math;
2145
+ const {copy: copy$5, multiplyParent: multiplyParent$3} = MatrixHelper, {round: round$1} = Math, tempPixelBounds = new Bounds, tempPixelBounds2 = new Bounds;
2143
2146
 
2144
2147
  const minSize = {
2145
2148
  width: 1,
@@ -2304,44 +2307,44 @@ class LeaferCanvasBase extends Canvas {
2304
2307
  const {pixelRatio: pixelRatio} = this;
2305
2308
  this.filter = `blur(${blur * pixelRatio}px)`;
2306
2309
  }
2307
- copyWorld(canvas, from, to, blendMode) {
2310
+ copyWorld(canvas, from, to, blendMode, ceilPixel = true) {
2308
2311
  if (blendMode) this.blendMode = blendMode;
2309
2312
  if (from) {
2310
- const {pixelRatio: pixelRatio} = this;
2311
- if (!to) to = from;
2312
- this.drawImage(canvas.view, from.x * pixelRatio, from.y * pixelRatio, from.width * pixelRatio, from.height * pixelRatio, to.x * pixelRatio, to.y * pixelRatio, to.width * pixelRatio, to.height * pixelRatio);
2313
+ this.setTempPixelBounds(from, ceilPixel);
2314
+ if (!to) to = tempPixelBounds; else this.setTempPixelBounds2(to, ceilPixel), to = tempPixelBounds2;
2315
+ this.drawImage(canvas.view, tempPixelBounds.x, tempPixelBounds.y, tempPixelBounds.width, tempPixelBounds.height, to.x, to.y, to.width, to.height);
2313
2316
  } else {
2314
2317
  this.drawImage(canvas.view, 0, 0);
2315
2318
  }
2316
2319
  if (blendMode) this.blendMode = "source-over";
2317
2320
  }
2318
- copyWorldToInner(canvas, fromWorld, toInnerBounds, blendMode) {
2319
- if (blendMode) this.blendMode = blendMode;
2321
+ copyWorldToInner(canvas, fromWorld, toInnerBounds, blendMode, ceilPixel = true) {
2320
2322
  if (fromWorld.b || fromWorld.c) {
2321
2323
  this.save();
2322
2324
  this.resetTransform();
2323
- this.copyWorld(canvas, fromWorld, BoundsHelper.tempToOuterOf(toInnerBounds, fromWorld));
2325
+ this.copyWorld(canvas, fromWorld, BoundsHelper.tempToOuterOf(toInnerBounds, fromWorld), blendMode, ceilPixel);
2324
2326
  this.restore();
2325
2327
  } else {
2326
- const {pixelRatio: pixelRatio} = this;
2327
- this.drawImage(canvas.view, fromWorld.x * pixelRatio, fromWorld.y * pixelRatio, fromWorld.width * pixelRatio, fromWorld.height * pixelRatio, toInnerBounds.x, toInnerBounds.y, toInnerBounds.width, toInnerBounds.height);
2328
+ if (blendMode) this.blendMode = blendMode;
2329
+ this.setTempPixelBounds(fromWorld, ceilPixel);
2330
+ this.drawImage(canvas.view, tempPixelBounds.x, tempPixelBounds.y, tempPixelBounds.width, tempPixelBounds.height, toInnerBounds.x, toInnerBounds.y, toInnerBounds.width, toInnerBounds.height);
2331
+ if (blendMode) this.blendMode = "source-over";
2328
2332
  }
2329
- if (blendMode) this.blendMode = "source-over";
2330
2333
  }
2331
- copyWorldByReset(canvas, from, to, blendMode, onlyResetTransform) {
2334
+ copyWorldByReset(canvas, from, to, blendMode, onlyResetTransform, ceilPixel = true) {
2332
2335
  this.resetTransform();
2333
- this.copyWorld(canvas, from, to, blendMode);
2336
+ this.copyWorld(canvas, from, to, blendMode, ceilPixel);
2334
2337
  if (!onlyResetTransform) this.useWorldTransform();
2335
2338
  }
2336
2339
  useGrayscaleAlpha(bounds) {
2337
- this.setTempBounds(bounds, true, true);
2340
+ this.setTempPixelBounds(bounds, true, true);
2338
2341
  let alpha, pixel;
2339
- const {context: context} = this, imageData = context.getImageData(tempBounds.x, tempBounds.y, tempBounds.width, tempBounds.height), {data: data} = imageData;
2342
+ const {context: context} = this, imageData = context.getImageData(tempPixelBounds.x, tempPixelBounds.y, tempPixelBounds.width, tempPixelBounds.height), {data: data} = imageData;
2340
2343
  for (let i = 0, len = data.length; i < len; i += 4) {
2341
2344
  pixel = data[i] * .299 + data[i + 1] * .587 + data[i + 2] * .114;
2342
2345
  if (alpha = data[i + 3]) data[i + 3] = alpha === 255 ? pixel : alpha * (pixel / 255);
2343
2346
  }
2344
- context.putImageData(imageData, tempBounds.x, tempBounds.y);
2347
+ context.putImageData(imageData, tempPixelBounds.x, tempPixelBounds.y);
2345
2348
  }
2346
2349
  useMask(maskCanvas, fromBounds, toBounds) {
2347
2350
  this.copyWorld(maskCanvas, fromBounds, toBounds, "destination-in");
@@ -2349,42 +2352,48 @@ class LeaferCanvasBase extends Canvas {
2349
2352
  useEraser(eraserCanvas, fromBounds, toBounds) {
2350
2353
  this.copyWorld(eraserCanvas, fromBounds, toBounds, "destination-out");
2351
2354
  }
2352
- fillWorld(bounds, color, blendMode) {
2355
+ fillWorld(bounds, color, blendMode, ceilPixel) {
2353
2356
  if (blendMode) this.blendMode = blendMode;
2354
2357
  this.fillStyle = color;
2355
- this.setTempBounds(bounds);
2356
- this.fillRect(tempBounds.x, tempBounds.y, tempBounds.width, tempBounds.height);
2358
+ this.setTempPixelBounds(bounds, ceilPixel);
2359
+ this.fillRect(tempPixelBounds.x, tempPixelBounds.y, tempPixelBounds.width, tempPixelBounds.height);
2357
2360
  if (blendMode) this.blendMode = "source-over";
2358
2361
  }
2359
- strokeWorld(bounds, color, blendMode) {
2362
+ strokeWorld(bounds, color, blendMode, ceilPixel) {
2360
2363
  if (blendMode) this.blendMode = blendMode;
2361
2364
  this.strokeStyle = color;
2362
- this.setTempBounds(bounds);
2363
- this.strokeRect(tempBounds.x, tempBounds.y, tempBounds.width, tempBounds.height);
2365
+ this.setTempPixelBounds(bounds, ceilPixel);
2366
+ this.strokeRect(tempPixelBounds.x, tempPixelBounds.y, tempPixelBounds.width, tempPixelBounds.height);
2364
2367
  if (blendMode) this.blendMode = "source-over";
2365
2368
  }
2366
- clipWorld(bounds, ceilPixel) {
2369
+ clipWorld(bounds, ceilPixel = true) {
2367
2370
  this.beginPath();
2368
- this.setTempBounds(bounds, ceilPixel);
2369
- this.rect(tempBounds.x, tempBounds.y, tempBounds.width, tempBounds.height);
2371
+ this.setTempPixelBounds(bounds, ceilPixel);
2372
+ this.rect(tempPixelBounds.x, tempPixelBounds.y, tempPixelBounds.width, tempPixelBounds.height);
2370
2373
  this.clip();
2371
2374
  }
2372
2375
  clipUI(ruleData) {
2373
2376
  ruleData.windingRule ? this.clip(ruleData.windingRule) : this.clip();
2374
2377
  }
2375
- clearWorld(bounds, ceilPixel) {
2376
- this.setTempBounds(bounds, ceilPixel);
2377
- this.clearRect(tempBounds.x, tempBounds.y, tempBounds.width, tempBounds.height);
2378
+ clearWorld(bounds, ceilPixel = true) {
2379
+ this.setTempPixelBounds(bounds, ceilPixel);
2380
+ this.clearRect(tempPixelBounds.x, tempPixelBounds.y, tempPixelBounds.width, tempPixelBounds.height);
2378
2381
  }
2379
2382
  clear() {
2380
2383
  const {pixelRatio: pixelRatio} = this;
2381
2384
  this.clearRect(0, 0, this.width * pixelRatio + 2, this.height * pixelRatio + 2);
2382
2385
  }
2383
- setTempBounds(bounds, ceil, intersect) {
2384
- tempBounds.set(bounds);
2385
- if (intersect) tempBounds.intersect(this.bounds);
2386
- tempBounds.scale(this.pixelRatio);
2387
- if (ceil) tempBounds.ceil();
2386
+ setTempPixelBounds(bounds, ceil, intersect) {
2387
+ this.copyToPixelBounds(tempPixelBounds, bounds, ceil, intersect);
2388
+ }
2389
+ setTempPixelBounds2(bounds, ceil, intersect) {
2390
+ this.copyToPixelBounds(tempPixelBounds2, bounds, ceil, intersect);
2391
+ }
2392
+ copyToPixelBounds(pixelBounds, bounds, ceil, intersect) {
2393
+ pixelBounds.set(bounds);
2394
+ if (intersect) pixelBounds.intersect(this.bounds);
2395
+ pixelBounds.scale(this.pixelRatio);
2396
+ if (ceil) pixelBounds.ceil();
2388
2397
  }
2389
2398
  isSameSize(size) {
2390
2399
  return this.width === size.width && this.height === size.height && (!size.pixelRatio || this.pixelRatio === size.pixelRatio);
@@ -2400,7 +2409,7 @@ class LeaferCanvasBase extends Canvas {
2400
2409
  recycle(clearBounds) {
2401
2410
  if (!this.recycled) {
2402
2411
  this.restore();
2403
- clearBounds ? this.clearWorld(clearBounds, true) : this.clear();
2412
+ clearBounds ? this.clearWorld(clearBounds) : this.clear();
2404
2413
  this.manager ? this.manager.recycle(this) : this.destroy();
2405
2414
  }
2406
2415
  }
@@ -4140,6 +4149,17 @@ function positionType(defaultValue, checkFiniteNumber) {
4140
4149
  }));
4141
4150
  }
4142
4151
 
4152
+ function scrollType(defaultValue, checkFiniteNumber) {
4153
+ return decorateLeafAttr(defaultValue, key => attr({
4154
+ set(value) {
4155
+ if (this.__setAttr(key, value, checkFiniteNumber)) {
4156
+ this.__layout.matrixChanged || this.__layout.matrixChange();
4157
+ this.__scrollWorld || (this.__scrollWorld = {});
4158
+ }
4159
+ }
4160
+ }));
4161
+ }
4162
+
4143
4163
  function autoLayoutType(defaultValue) {
4144
4164
  return decorateLeafAttr(defaultValue, key => attr({
4145
4165
  set(value) {
@@ -4554,7 +4574,7 @@ const LeafHelper = {
4554
4574
  x: x,
4555
4575
  y: y
4556
4576
  };
4557
- isInnerPoint ? toOuterPoint$1(t.localTransform, local, local, true) : t.parent && toInnerPoint$1(t.parent.worldTransform, local, local, true);
4577
+ isInnerPoint ? toOuterPoint$1(t.localTransform, local, local, true) : t.parent && toInnerPoint$1(t.parent.scrollWorldTransform, local, local, true);
4558
4578
  L.moveLocal(t, local.x, local.y, transition);
4559
4579
  },
4560
4580
  moveLocal(t, x, y = 0, transition) {
@@ -4578,7 +4598,7 @@ const LeafHelper = {
4578
4598
  }
4579
4599
  copy$3(matrix, o);
4580
4600
  scaleOfOuter(matrix, origin, scaleX, scaleY);
4581
- if (t.origin || t.around) {
4601
+ if (L.hasHighPosition(t)) {
4582
4602
  L.setTransform(t, matrix, resize, transition);
4583
4603
  } else {
4584
4604
  const x = t.x + matrix.e - o.e, y = t.y + matrix.f - o.f;
@@ -4597,7 +4617,7 @@ const LeafHelper = {
4597
4617
  const o = t.__localMatrix;
4598
4618
  copy$3(matrix, o);
4599
4619
  rotateOfOuter(matrix, origin, angle);
4600
- if (t.origin || t.around) L.setTransform(t, matrix, false, transition); else t.set({
4620
+ if (L.hasHighPosition(t)) L.setTransform(t, matrix, false, transition); else t.set({
4601
4621
  x: t.x + matrix.e - o.e,
4602
4622
  y: t.y + matrix.f - o.f,
4603
4623
  rotation: MathHelper.formatRotation(t.rotation + angle)
@@ -4614,7 +4634,7 @@ const LeafHelper = {
4614
4634
  transformWorld(t, transform, resize, transition) {
4615
4635
  copy$3(matrix, t.worldTransform);
4616
4636
  multiplyParent$2(matrix, transform);
4617
- if (t.parent) divideParent(matrix, t.parent.worldTransform);
4637
+ if (t.parent) divideParent(matrix, t.parent.scrollWorldTransform);
4618
4638
  L.setTransform(t, matrix, resize, transition);
4619
4639
  },
4620
4640
  transform(t, transform, resize, transition) {
@@ -4625,6 +4645,10 @@ const LeafHelper = {
4625
4645
  setTransform(t, transform, resize, transition) {
4626
4646
  const data = t.__, originPoint = data.origin && L.getInnerOrigin(t, data.origin);
4627
4647
  const layout = getLayout(transform, originPoint, data.around && L.getInnerOrigin(t, data.around));
4648
+ if (L.hasOffset(t)) {
4649
+ layout.x -= data.offsetX;
4650
+ layout.y -= data.offsetY;
4651
+ }
4628
4652
  if (resize) {
4629
4653
  const scaleX = layout.scaleX / t.scaleX, scaleY = layout.scaleY / t.scaleY;
4630
4654
  delete layout.scaleX, delete layout.scaleY;
@@ -4653,13 +4677,19 @@ const LeafHelper = {
4653
4677
  },
4654
4678
  getRelativeWorld(t, relative, temp) {
4655
4679
  copy$3(matrix, t.worldTransform);
4656
- divideParent(matrix, relative.worldTransform);
4680
+ divideParent(matrix, relative.scrollWorldTransform);
4657
4681
  return temp ? matrix : Object.assign({}, matrix);
4658
4682
  },
4659
4683
  drop(t, parent, index, resize) {
4660
4684
  t.setTransform(L.getRelativeWorld(t, parent, true), resize);
4661
4685
  parent.add(t, index);
4662
4686
  },
4687
+ hasHighPosition(t) {
4688
+ return t.origin || t.around || L.hasOffset(t);
4689
+ },
4690
+ hasOffset(t) {
4691
+ return t.offsetX || t.offsetY;
4692
+ },
4663
4693
  hasParent(p, parent) {
4664
4694
  if (!parent) return false;
4665
4695
  while (p) {
@@ -4685,8 +4715,7 @@ const L = LeafHelper;
4685
4715
  const {updateAllMatrix: updateAllMatrix$1, updateMatrix: updateMatrix$1, updateAllWorldOpacity: updateAllWorldOpacity, updateAllChange: updateAllChange, updateChange: updateChange} = L;
4686
4716
 
4687
4717
  function getTempLocal(t, world) {
4688
- t.__layout.update();
4689
- return t.parent ? PointHelper.tempToInnerOf(world, t.parent.__world) : world;
4718
+ return t.parent ? PointHelper.tempToInnerOf(world, t.parent.scrollWorldTransform) : world;
4690
4719
  }
4691
4720
 
4692
4721
  const LeafBoundsHelper = {
@@ -5238,6 +5267,8 @@ ChildEvent.UNMOUNTED = "unmounted";
5238
5267
 
5239
5268
  ChildEvent.DESTROY = "destroy";
5240
5269
 
5270
+ const SCROLL = "property.scroll";
5271
+
5241
5272
  class PropertyEvent extends Event {
5242
5273
  constructor(type, target, attrName, oldValue, newValue) {
5243
5274
  super(type, target);
@@ -5251,6 +5282,13 @@ PropertyEvent.CHANGE = "property.change";
5251
5282
 
5252
5283
  PropertyEvent.LEAFER_CHANGE = "property.leafer_change";
5253
5284
 
5285
+ PropertyEvent.SCROLL = SCROLL;
5286
+
5287
+ const extraPropertyEventMap = {
5288
+ scrollX: SCROLL,
5289
+ scrollY: SCROLL
5290
+ };
5291
+
5254
5292
  class ImageEvent extends Event {
5255
5293
  constructor(type, data) {
5256
5294
  super(type);
@@ -5526,7 +5564,9 @@ class Eventer {
5526
5564
  if (!id) return;
5527
5565
  const list = isArray(id) ? id : [ id ];
5528
5566
  list.forEach(item => {
5529
- if (!item.listener) isArray(item.type) && item.type.forEach(v => item.current.off(v[0], v[1], v[3])); else item.current.off(item.type, item.listener, item.options);
5567
+ if (item) {
5568
+ if (!item.listener) isArray(item.type) && item.type.forEach(v => item.current.off(v[0], v[1], v[3])); else item.current.off(item.type, item.listener, item.options);
5569
+ }
5530
5570
  });
5531
5571
  list.length = 0;
5532
5572
  }
@@ -5620,8 +5660,6 @@ const LeafDataProxy = {
5620
5660
  }
5621
5661
  if (isObject(newValue) || oldValue !== newValue) {
5622
5662
  this.__realSetAttr(name, newValue);
5623
- const {CHANGE: CHANGE} = PropertyEvent;
5624
- const event = new PropertyEvent(CHANGE, this, name, oldValue, newValue);
5625
5663
  if (this.isLeafer) {
5626
5664
  this.emitEvent(new PropertyEvent(PropertyEvent.LEAFER_CHANGE, this, name, oldValue, newValue));
5627
5665
  const transformEventName = leaferTransformAttrMap[name];
@@ -5629,10 +5667,10 @@ const LeafDataProxy = {
5629
5667
  this.emitEvent(new LeaferEvent(transformEventName, this));
5630
5668
  this.emitEvent(new LeaferEvent(LeaferEvent.TRANSFORM, this));
5631
5669
  }
5632
- } else {
5633
- if (this.hasEvent(CHANGE)) this.emitEvent(event);
5634
5670
  }
5635
- this.leafer.emitEvent(event);
5671
+ this.emitPropertyEvent(PropertyEvent.CHANGE, name, oldValue, newValue);
5672
+ const extraPropertyEvent = extraPropertyEventMap[name];
5673
+ if (extraPropertyEvent) this.emitPropertyEvent(extraPropertyEvent, name, oldValue, newValue);
5636
5674
  return true;
5637
5675
  } else {
5638
5676
  return false;
@@ -5642,6 +5680,11 @@ const LeafDataProxy = {
5642
5680
  return true;
5643
5681
  }
5644
5682
  },
5683
+ emitPropertyEvent(type, name, oldValue, newValue) {
5684
+ const event = new PropertyEvent(type, this, name, oldValue, newValue);
5685
+ this.isLeafer || this.hasEvent(type) && this.emitEvent(event);
5686
+ this.leafer.emitEvent(event);
5687
+ },
5645
5688
  __realSetAttr(name, newValue) {
5646
5689
  const data = this.__;
5647
5690
  data[name] = newValue;
@@ -5660,8 +5703,9 @@ const {toPoint: toPoint, tempPoint: tempPoint} = AroundHelper;
5660
5703
 
5661
5704
  const LeafMatrix = {
5662
5705
  __updateWorldMatrix() {
5663
- const {parent: parent, __layout: __layout} = this;
5664
- multiplyParent$1(this.__local || __layout, parent ? parent.__world : defaultWorld, this.__world, !!__layout.affectScaleOrRotation, this.__, parent && (parent.scrollY || parent.scrollX) && parent.__);
5706
+ const {parent: parent, __layout: __layout, __world: __world, __scrollWorld: __scrollWorld, __: __} = this;
5707
+ multiplyParent$1(this.__local || __layout, parent ? parent.__scrollWorld || parent.__world : defaultWorld, __world, !!__layout.affectScaleOrRotation, __);
5708
+ if (__scrollWorld) translateInner(Object.assign(__scrollWorld, __world), __.scrollX, __.scrollY);
5665
5709
  },
5666
5710
  __updateLocalMatrix() {
5667
5711
  if (this.__local) {
@@ -5758,7 +5802,7 @@ const LeafBounds = {
5758
5802
  __updateLocalRenderBounds() {
5759
5803
  toOuterOf$1(this.__layout.renderBounds, this.__localMatrix, this.__layout.localRenderBounds);
5760
5804
  },
5761
- __updateBoxBounds() {
5805
+ __updateBoxBounds(_secondLayout, _bounds) {
5762
5806
  const b = this.__layout.boxBounds;
5763
5807
  const data = this.__;
5764
5808
  if (data.__pathInputed) {
@@ -5792,11 +5836,11 @@ const LeafBounds = {
5792
5836
  data.__naturalWidth = layout.boxBounds.width;
5793
5837
  data.__naturalHeight = layout.boxBounds.height;
5794
5838
  },
5795
- __updateStrokeBounds() {
5839
+ __updateStrokeBounds(_bounds) {
5796
5840
  const layout = this.__layout;
5797
5841
  copyAndSpread(layout.strokeBounds, layout.boxBounds, layout.strokeBoxSpread);
5798
5842
  },
5799
- __updateRenderBounds() {
5843
+ __updateRenderBounds(_bounds) {
5800
5844
  const layout = this.__layout;
5801
5845
  layout.renderSpread > 0 ? copyAndSpread(layout.renderBounds, layout.boxBounds, layout.renderSpread) : copy$1(layout.renderBounds, layout.strokeBounds);
5802
5846
  }
@@ -5945,6 +5989,10 @@ exports.Leaf = class Leaf {
5945
5989
  get localTransform() {
5946
5990
  return this.__layout.getTransform("local");
5947
5991
  }
5992
+ get scrollWorldTransform() {
5993
+ this.updateLayout();
5994
+ return this.__scrollWorld || this.__world;
5995
+ }
5948
5996
  get boxBounds() {
5949
5997
  return this.getBounds("box", "inner");
5950
5998
  }
@@ -5961,7 +6009,7 @@ exports.Leaf = class Leaf {
5961
6009
  return this.getBounds("render");
5962
6010
  }
5963
6011
  get worldOpacity() {
5964
- this.__layout.update();
6012
+ this.updateLayout();
5965
6013
  return this.__worldOpacity;
5966
6014
  }
5967
6015
  get __worldFlipped() {
@@ -6136,10 +6184,10 @@ exports.Leaf = class Leaf {
6136
6184
  __updateLocalBoxBounds() {}
6137
6185
  __updateLocalStrokeBounds() {}
6138
6186
  __updateLocalRenderBounds() {}
6139
- __updateBoxBounds() {}
6187
+ __updateBoxBounds(_secondLayout, _bounds) {}
6140
6188
  __updateContentBounds() {}
6141
- __updateStrokeBounds() {}
6142
- __updateRenderBounds() {}
6189
+ __updateStrokeBounds(_bounds) {}
6190
+ __updateRenderBounds(_bounds) {}
6143
6191
  __updateAutoLayout() {}
6144
6192
  __updateFlowLayout() {}
6145
6193
  __updateNaturalSize() {}
@@ -6439,14 +6487,14 @@ exports.Branch = class Branch extends exports.Leaf {
6439
6487
  }
6440
6488
  return 0;
6441
6489
  }
6442
- __updateBoxBounds() {
6443
- setListWithFn(this.__layout.boxBounds, this.children, this.__hasMask ? maskLocalBoxBounds : localBoxBounds);
6490
+ __updateBoxBounds(_secondLayout, bounds) {
6491
+ setListWithFn(bounds || this.__layout.boxBounds, this.children, this.__hasMask ? maskLocalBoxBounds : localBoxBounds);
6444
6492
  }
6445
- __updateStrokeBounds() {
6446
- setListWithFn(this.__layout.strokeBounds, this.children, this.__hasMask ? maskLocalStrokeBounds : localStrokeBounds);
6493
+ __updateStrokeBounds(bounds) {
6494
+ setListWithFn(bounds || this.__layout.strokeBounds, this.children, this.__hasMask ? maskLocalStrokeBounds : localStrokeBounds);
6447
6495
  }
6448
- __updateRenderBounds() {
6449
- setListWithFn(this.__layout.renderBounds, this.children, this.__hasMask ? maskLocalRenderBounds : localRenderBounds);
6496
+ __updateRenderBounds(bounds) {
6497
+ setListWithFn(bounds || this.__layout.renderBounds, this.children, this.__hasMask ? maskLocalRenderBounds : localRenderBounds);
6450
6498
  }
6451
6499
  __updateSortChildren() {
6452
6500
  let affectSort;
@@ -6693,7 +6741,7 @@ class LeafLevelList {
6693
6741
  }
6694
6742
  }
6695
6743
 
6696
- const version = "1.9.1";
6744
+ const version = "1.9.3";
6697
6745
 
6698
6746
  exports.AlignHelper = AlignHelper;
6699
6747
 
@@ -6875,6 +6923,8 @@ exports.emptyData = emptyData;
6875
6923
 
6876
6924
  exports.eraserType = eraserType;
6877
6925
 
6926
+ exports.extraPropertyEventMap = extraPropertyEventMap;
6927
+
6878
6928
  exports.getBoundsData = getBoundsData;
6879
6929
 
6880
6930
  exports.getDescriptor = getDescriptor;
@@ -6933,6 +6983,8 @@ exports.rotationType = rotationType;
6933
6983
 
6934
6984
  exports.scaleType = scaleType;
6935
6985
 
6986
+ exports.scrollType = scrollType;
6987
+
6936
6988
  exports.sortType = sortType;
6937
6989
 
6938
6990
  exports.strokeType = strokeType;