@leafer-ui/worker 2.0.4 → 2.0.6

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.
@@ -7053,7 +7053,7 @@ class LeafLevelList {
7053
7053
  }
7054
7054
  }
7055
7055
 
7056
- const version = "2.0.4";
7056
+ const version = "2.0.6";
7057
7057
 
7058
7058
  class LeaferCanvas extends LeaferCanvasBase {
7059
7059
  get allowBackgroundColor() {
@@ -8542,6 +8542,7 @@ let UI = UI_1 = class UI extends Leaf {
8542
8542
  createProxyData() {
8543
8543
  return undefined;
8544
8544
  }
8545
+ clearProxyData() {}
8545
8546
  find(_condition, _options) {
8546
8547
  return Plugin.need("find");
8547
8548
  }
@@ -11809,17 +11810,19 @@ function image(ui, attrName, paint, boxBounds, firstUse) {
11809
11810
  }
11810
11811
 
11811
11812
  function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds) {
11813
+ let needUpdate = true;
11812
11814
  const data = ui.__;
11813
11815
  if (attrName === "fill" && !data.__naturalWidth) {
11814
11816
  data.__naturalWidth = image.width / data.pixelRatio;
11815
11817
  data.__naturalHeight = image.height / data.pixelRatio;
11816
11818
  if (data.__autoSide) {
11817
11819
  ui.forceUpdate("width");
11820
+ LeafHelper.updateBounds(ui);
11818
11821
  if (ui.__proxyData) {
11819
11822
  ui.setProxyAttr("width", data.width);
11820
11823
  ui.setProxyAttr("height", data.height);
11821
11824
  }
11822
- return false;
11825
+ needUpdate = false;
11823
11826
  }
11824
11827
  }
11825
11828
  if (!leafPaint.data) {
@@ -11829,7 +11832,7 @@ function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds
11829
11832
  if (clip || opacity && opacity < 1 || blendMode) leafPaint.complex = clip ? 2 : true;
11830
11833
  }
11831
11834
  if (paint.filter) PaintImage.applyFilter(leafPaint, image, paint.filter, ui);
11832
- return true;
11835
+ return needUpdate;
11833
11836
  }
11834
11837
 
11835
11838
  function onLoad(ui, event) {
@@ -12279,10 +12282,10 @@ const realFrom = {};
12279
12282
  const realTo = {};
12280
12283
 
12281
12284
  function conicGradient(paint, box) {
12282
- let {from: from, to: to, type: type, opacity: opacity, stretch: stretch} = paint;
12285
+ let {from: from, to: to, type: type, opacity: opacity, rotation: rotation, stretch: stretch} = paint;
12283
12286
  toPoint(from || "center", box, realFrom);
12284
12287
  toPoint(to || "bottom", box, realTo);
12285
- const style = Platform.conicGradientSupport ? Platform.canvas.createConicGradient(0, realFrom.x, realFrom.y) : Platform.canvas.createRadialGradient(realFrom.x, realFrom.y, 0, realFrom.x, realFrom.y, getDistance(realFrom, realTo));
12288
+ const style = Platform.conicGradientSupport ? Platform.canvas.createConicGradient(rotation ? rotation * OneRadian : 0, realFrom.x, realFrom.y) : Platform.canvas.createRadialGradient(realFrom.x, realFrom.y, 0, realFrom.x, realFrom.y, getDistance(realFrom, realTo));
12286
12289
  const data = {
12287
12290
  type: type,
12288
12291
  style: style