@leafer-draw/worker 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
  class LeaferCanvas extends LeaferCanvasBase {
6990
6991
  get allowBackgroundColor() {
@@ -7141,7 +7142,10 @@ class Watcher {
7141
7142
  if (this.running) this.target.emit(RenderEvent.REQUEST);
7142
7143
  }
7143
7144
  __onAttrChange(event) {
7144
- if (this.config.usePartLayout) this.__updatedList.add(event.target);
7145
+ this.add(event.target);
7146
+ }
7147
+ add(leaf) {
7148
+ if (this.config.usePartLayout) this.__updatedList.add(leaf);
7145
7149
  this.update();
7146
7150
  }
7147
7151
  __onChildEvent(event) {
@@ -7980,11 +7984,7 @@ class PolygonData extends UIData {
7980
7984
  }
7981
7985
  }
7982
7986
 
7983
- class StarData extends UIData {
7984
- get __boxStroke() {
7985
- return !this.__pathInputed;
7986
- }
7987
- }
7987
+ class StarData extends UIData {}
7988
7988
 
7989
7989
  class PathData extends UIData {
7990
7990
  get __pathInputed() {
@@ -10277,13 +10277,9 @@ function createPattern(paint, ui, canvas, renderOptions) {
10277
10277
  if (fixScale) scaleX *= fixScale, scaleY *= fixScale;
10278
10278
  width *= scaleX;
10279
10279
  height *= scaleY;
10280
- if (gap) {
10280
+ if (gap && !brush) {
10281
10281
  xGap = gap.x * scaleX / abs$1(data.scaleX || 1);
10282
10282
  yGap = gap.y * scaleY / abs$1(data.scaleY || 1);
10283
- if (brush) {
10284
- const brushScale = PaintImage.getBrushScale(paint, ui);
10285
- xGap /= brushScale, yGap /= brushScale;
10286
- }
10287
10283
  }
10288
10284
  if (transform || scaleX !== 1 || scaleY !== 1) {
10289
10285
  scaleX *= getFloorScale(width + (xGap || 0));