@leafer/worker 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
  class LeaferCanvas extends LeaferCanvasBase {
6821
6821
  get allowBackgroundColor() {
@@ -11938,8 +11938,8 @@ function shadow$1(ui, current, shape) {
11938
11938
  const sx = Math.abs(nowWorld.scaleX);
11939
11939
  if (sx > 1) otherScale = 1 / sx;
11940
11940
  }
11941
- other.setWorldShadow(offsetOutBounds$1.offsetX + item.x * scaleX * otherScale, offsetOutBounds$1.offsetY + item.y * scaleY * otherScale, item.blur * scaleX * otherScale, ColorConvert.string(item.color));
11942
- transform = getShadowTransform(ui, other, shape, item, offsetOutBounds$1, otherScale);
11941
+ 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));
11942
+ transform = Effect.getShadowTransform(ui, other, shape, item, offsetOutBounds$1, otherScale);
11943
11943
  if (transform) other.setTransform(transform);
11944
11944
  drawWorldShadow(other, offsetOutBounds$1, shape);
11945
11945
  if (transform) other.resetTransform();
@@ -12015,8 +12015,8 @@ function innerShadow(ui, current, shape) {
12015
12015
  if (sx > 1) otherScale = 1 / sx;
12016
12016
  }
12017
12017
  other.save();
12018
- other.setWorldShadow(offsetOutBounds.offsetX + item.x * scaleX * otherScale, offsetOutBounds.offsetY + item.y * scaleY * otherScale, item.blur * scaleX * otherScale);
12019
- transform = getShadowTransform(ui, other, shape, item, offsetOutBounds, otherScale, true);
12018
+ other.setWorldShadow(offsetOutBounds.offsetX + (item.x || 0) * scaleX * otherScale, offsetOutBounds.offsetY + (item.y || 0) * scaleY * otherScale, (item.blur || 0) * scaleX * otherScale);
12019
+ transform = Effect.getShadowTransform(ui, other, shape, item, offsetOutBounds, otherScale, true);
12020
12020
  if (transform) other.setTransform(transform);
12021
12021
  drawWorldShadow(other, offsetOutBounds, shape);
12022
12022
  other.restore();
@@ -12652,6 +12652,7 @@ const TextConvertModule = {
12652
12652
  };
12653
12653
 
12654
12654
  function string(color, opacity) {
12655
+ if (!color) return "#000";
12655
12656
  const doOpacity = isNumber(opacity) && opacity < 1;
12656
12657
  if (isString(color)) {
12657
12658
  if (doOpacity && ColorConvert.object) color = ColorConvert.object(color); else return color;