leafer-ui 2.1.8 → 2.1.10

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.
@@ -1295,6 +1295,7 @@ const BoundsHelper = {
1295
1295
  },
1296
1296
  copyAndSpread(t, bounds, spread, isShrink, side) {
1297
1297
  const {x: x, y: y, width: width, height: height} = bounds;
1298
+ if (!spread) spread = 0;
1298
1299
  if (isArray(spread)) {
1299
1300
  const four = fourNumber(spread);
1300
1301
  isShrink ? B.set(t, x + four[3], y + four[0], width - four[1] - four[3], height - four[2] - four[0]) : B.set(t, x - four[3], y - four[0], width + four[1] + four[3], height + four[2] + four[0]);
@@ -6984,7 +6985,7 @@ class LeafLevelList {
6984
6985
  }
6985
6986
  }
6986
6987
 
6987
- const version = "2.1.8";
6988
+ const version = "2.1.10";
6988
6989
 
6989
6990
  const debug$5 = Debug.get("LeaferCanvas");
6990
6991
 
@@ -7335,7 +7336,10 @@ class Watcher {
7335
7336
  if (this.running) this.target.emit(RenderEvent.REQUEST);
7336
7337
  }
7337
7338
  __onAttrChange(event) {
7338
- if (this.config.usePartLayout) this.__updatedList.add(event.target);
7339
+ this.add(event.target);
7340
+ }
7341
+ add(leaf) {
7342
+ if (this.config.usePartLayout) this.__updatedList.add(leaf);
7339
7343
  this.update();
7340
7344
  }
7341
7345
  __onChildEvent(event) {
@@ -8374,11 +8378,7 @@ class PolygonData extends UIData {
8374
8378
  }
8375
8379
  }
8376
8380
 
8377
- class StarData extends UIData {
8378
- get __boxStroke() {
8379
- return !this.__pathInputed;
8380
- }
8381
- }
8381
+ class StarData extends UIData {}
8382
8382
 
8383
8383
  class PathData extends UIData {
8384
8384
  get __pathInputed() {
@@ -12534,13 +12534,9 @@ function createPattern(paint, ui, canvas, renderOptions) {
12534
12534
  if (fixScale) scaleX *= fixScale, scaleY *= fixScale;
12535
12535
  width *= scaleX;
12536
12536
  height *= scaleY;
12537
- if (gap) {
12537
+ if (gap && !brush) {
12538
12538
  xGap = gap.x * scaleX / abs$1(data.scaleX || 1);
12539
12539
  yGap = gap.y * scaleY / abs$1(data.scaleY || 1);
12540
- if (brush) {
12541
- const brushScale = PaintImage.getBrushScale(paint, ui);
12542
- xGap /= brushScale, yGap /= brushScale;
12543
- }
12544
12540
  }
12545
12541
  if (transform || scaleX !== 1 || scaleY !== 1) {
12546
12542
  scaleX *= getFloorScale(width + (xGap || 0));