@leafer-draw/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() {
@@ -10366,8 +10366,8 @@ function shadow(ui, current, shape) {
10366
10366
  const sx = Math.abs(nowWorld.scaleX);
10367
10367
  if (sx > 1) otherScale = 1 / sx;
10368
10368
  }
10369
- other.setWorldShadow(offsetOutBounds$1.offsetX + item.x * scaleX * otherScale, offsetOutBounds$1.offsetY + item.y * scaleY * otherScale, item.blur * scaleX * otherScale, ColorConvert.string(item.color));
10370
- transform = getShadowTransform(ui, other, shape, item, offsetOutBounds$1, otherScale);
10369
+ 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));
10370
+ transform = Effect.getShadowTransform(ui, other, shape, item, offsetOutBounds$1, otherScale);
10371
10371
  if (transform) other.setTransform(transform);
10372
10372
  drawWorldShadow(other, offsetOutBounds$1, shape);
10373
10373
  if (transform) other.resetTransform();
@@ -10443,8 +10443,8 @@ function innerShadow(ui, current, shape) {
10443
10443
  if (sx > 1) otherScale = 1 / sx;
10444
10444
  }
10445
10445
  other.save();
10446
- other.setWorldShadow(offsetOutBounds.offsetX + item.x * scaleX * otherScale, offsetOutBounds.offsetY + item.y * scaleY * otherScale, item.blur * scaleX * otherScale);
10447
- transform = getShadowTransform(ui, other, shape, item, offsetOutBounds, otherScale, true);
10446
+ other.setWorldShadow(offsetOutBounds.offsetX + (item.x || 0) * scaleX * otherScale, offsetOutBounds.offsetY + (item.y || 0) * scaleY * otherScale, (item.blur || 0) * scaleX * otherScale);
10447
+ transform = Effect.getShadowTransform(ui, other, shape, item, offsetOutBounds, otherScale, true);
10448
10448
  if (transform) other.setTransform(transform);
10449
10449
  drawWorldShadow(other, offsetOutBounds, shape);
10450
10450
  other.restore();
@@ -11080,6 +11080,7 @@ const TextConvertModule = {
11080
11080
  };
11081
11081
 
11082
11082
  function string(color, opacity) {
11083
+ if (!color) return "#000";
11083
11084
  const doOpacity = isNumber(opacity) && opacity < 1;
11084
11085
  if (isString(color)) {
11085
11086
  if (doOpacity && ColorConvert.object) color = ColorConvert.object(color); else return color;