leafer-draw 1.9.8 → 1.9.9

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.
@@ -6815,7 +6815,7 @@ class LeafLevelList {
6815
6815
  }
6816
6816
  }
6817
6817
 
6818
- const version = "1.9.8";
6818
+ const version = "1.9.9";
6819
6819
 
6820
6820
  const debug$4 = Debug.get("LeaferCanvas");
6821
6821
 
@@ -10572,8 +10572,8 @@ function shadow(ui, current, shape) {
10572
10572
  const sx = Math.abs(nowWorld.scaleX);
10573
10573
  if (sx > 1) otherScale = 1 / sx;
10574
10574
  }
10575
- other.setWorldShadow(offsetOutBounds$1.offsetX + item.x * scaleX * otherScale, offsetOutBounds$1.offsetY + item.y * scaleY * otherScale, item.blur * scaleX * otherScale, ColorConvert.string(item.color));
10576
- transform = getShadowTransform(ui, other, shape, item, offsetOutBounds$1, otherScale);
10575
+ other.setWorldShadow(offsetOutBounds$1.offsetX + (item.x || 0) * scaleX * otherScale, offsetOutBounds$1.offsetY + (item.y || 0) * scaleY * otherScale, (item.blur || 0) * scaleX * otherScale, ColorConvert.string(item.color));
10576
+ transform = Effect.getShadowTransform(ui, other, shape, item, offsetOutBounds$1, otherScale);
10577
10577
  if (transform) other.setTransform(transform);
10578
10578
  drawWorldShadow(other, offsetOutBounds$1, shape);
10579
10579
  if (transform) other.resetTransform();
@@ -10649,8 +10649,8 @@ function innerShadow(ui, current, shape) {
10649
10649
  if (sx > 1) otherScale = 1 / sx;
10650
10650
  }
10651
10651
  other.save();
10652
- other.setWorldShadow(offsetOutBounds.offsetX + item.x * scaleX * otherScale, offsetOutBounds.offsetY + item.y * scaleY * otherScale, item.blur * scaleX * otherScale);
10653
- transform = getShadowTransform(ui, other, shape, item, offsetOutBounds, otherScale, true);
10652
+ other.setWorldShadow(offsetOutBounds.offsetX + (item.x || 0) * scaleX * otherScale, offsetOutBounds.offsetY + (item.y || 0) * scaleY * otherScale, (item.blur || 0) * scaleX * otherScale);
10653
+ transform = Effect.getShadowTransform(ui, other, shape, item, offsetOutBounds, otherScale, true);
10654
10654
  if (transform) other.setTransform(transform);
10655
10655
  drawWorldShadow(other, offsetOutBounds, shape);
10656
10656
  other.restore();
@@ -11286,6 +11286,7 @@ const TextConvertModule = {
11286
11286
  };
11287
11287
 
11288
11288
  function string(color, opacity) {
11289
+ if (!color) return "#000";
11289
11290
  const doOpacity = isNumber(opacity) && opacity < 1;
11290
11291
  if (isString(color)) {
11291
11292
  if (doOpacity && ColorConvert.object) color = ColorConvert.object(color); else return color;