leafer-game 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.
package/dist/web.js CHANGED
@@ -1223,6 +1223,7 @@ var LeaferUI = function(exports) {
1223
1223
  },
1224
1224
  copyAndSpread(t, bounds, spread, isShrink, side) {
1225
1225
  const {x: x, y: y, width: width, height: height} = bounds;
1226
+ if (!spread) spread = 0;
1226
1227
  if (isArray(spread)) {
1227
1228
  const four = fourNumber$1(spread);
1228
1229
  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]);
@@ -6568,7 +6569,7 @@ var LeaferUI = function(exports) {
6568
6569
  this.levelMap = null;
6569
6570
  }
6570
6571
  }
6571
- const version = "2.1.8";
6572
+ const version = "2.1.10";
6572
6573
  const debug$5 = Debug.get("LeaferCanvas");
6573
6574
  class LeaferCanvas extends LeaferCanvasBase {
6574
6575
  set zIndex(zIndex) {
@@ -6905,7 +6906,10 @@ var LeaferUI = function(exports) {
6905
6906
  if (this.running) this.target.emit(RenderEvent.REQUEST);
6906
6907
  }
6907
6908
  __onAttrChange(event) {
6908
- if (this.config.usePartLayout) this.__updatedList.add(event.target);
6909
+ this.add(event.target);
6910
+ }
6911
+ add(leaf) {
6912
+ if (this.config.usePartLayout) this.__updatedList.add(leaf);
6909
6913
  this.update();
6910
6914
  }
6911
6915
  __onChildEvent(event) {
@@ -7891,11 +7895,7 @@ var LeaferUI = function(exports) {
7891
7895
  return this.points || this.__pathInputed;
7892
7896
  }
7893
7897
  }
7894
- class StarData extends UIData {
7895
- get __boxStroke() {
7896
- return !this.__pathInputed;
7897
- }
7898
- }
7898
+ class StarData extends UIData {}
7899
7899
  class PathData extends UIData {
7900
7900
  get __pathInputed() {
7901
7901
  return 2;
@@ -11658,13 +11658,9 @@ var LeaferUI = function(exports) {
11658
11658
  if (fixScale) scaleX *= fixScale, scaleY *= fixScale;
11659
11659
  width *= scaleX;
11660
11660
  height *= scaleY;
11661
- if (gap) {
11661
+ if (gap && !brush) {
11662
11662
  xGap = gap.x * scaleX / abs$2(data.scaleX || 1);
11663
11663
  yGap = gap.y * scaleY / abs$2(data.scaleY || 1);
11664
- if (brush) {
11665
- const brushScale = PaintImage.getBrushScale(paint, ui);
11666
- xGap /= brushScale, yGap /= brushScale;
11667
- }
11668
11664
  }
11669
11665
  if (transform || scaleX !== 1 || scaleY !== 1) {
11670
11666
  scaleX *= getFloorScale(width + (xGap || 0));