@leafer-ui/miniapp 1.9.0 → 1.9.1

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.
@@ -2181,7 +2181,7 @@ class LeaferCanvasBase extends Canvas$1 {
2181
2181
  this.innerId = IncrementId.create(IncrementId.CNAVAS);
2182
2182
  const {width: width, height: height, pixelRatio: pixelRatio} = config;
2183
2183
  this.autoLayout = !width || !height;
2184
- this.size.pixelRatio = pixelRatio | Platform.devicePixelRatio;
2184
+ this.size.pixelRatio = pixelRatio || Platform.devicePixelRatio;
2185
2185
  this.config = config;
2186
2186
  this.init();
2187
2187
  }
@@ -6691,7 +6691,7 @@ class LeafLevelList {
6691
6691
  }
6692
6692
  }
6693
6693
 
6694
- const version = "1.9.0";
6694
+ const version = "1.9.1";
6695
6695
 
6696
6696
  class LeaferCanvas extends LeaferCanvasBase {
6697
6697
  get allowBackgroundColor() {
@@ -9407,7 +9407,7 @@ let Text = class Text extends UI {
9407
9407
  data.__letterSpacing = UnitConvert.number(letterSpacing, fontSize);
9408
9408
  data.__padding = padding ? MathHelper.fourNumber(padding) : undefined;
9409
9409
  data.__baseLine = data.__lineHeight - (data.__lineHeight - fontSize * .7) / 2;
9410
- data.__font = `${italic ? "italic " : ""}${textCase === "small-caps" ? "small-caps " : ""}${fontWeight !== "normal" ? fontWeight + " " : ""}${fontSize}px ${fontFamily}`;
9410
+ data.__font = `${italic ? "italic " : ""}${textCase === "small-caps" ? "small-caps " : ""}${fontWeight !== "normal" ? fontWeight + " " : ""}${fontSize || 12}px ${fontFamily || "caption"}`;
9411
9411
  data.__clipText = textOverflow !== "show" && !data.__autoSize;
9412
9412
  data.__textDrawData = TextConvert.getDrawData((data.__isPlacehold = data.placeholder && data.text === "") ? data.placeholder : data.text, this.__);
9413
9413
  }
@@ -11335,18 +11335,22 @@ const {getSpread: getSpread, getOuterOf: getOuterOf, getByMove: getByMove, getIn
11335
11335
 
11336
11336
  function shape(ui, current, options) {
11337
11337
  const canvas = current.getSameCanvas();
11338
- const nowWorld = ui.__nowWorld;
11338
+ const nowWorld = ui.__nowWorld, currentBounds = current.bounds;
11339
11339
  let bounds, matrix, fitMatrix, shapeBounds, worldCanvas;
11340
- let {scaleX: scaleX, scaleY: scaleY} = nowWorld;
11341
- if (scaleX < 0) scaleX = -scaleX;
11342
- if (scaleY < 0) scaleY = -scaleY;
11343
- if (current.bounds.includes(nowWorld)) {
11340
+ let {scaleX: scaleX, scaleY: scaleY} = ui.getRenderScaleData(true);
11341
+ if (currentBounds.includes(nowWorld)) {
11344
11342
  worldCanvas = canvas;
11345
11343
  bounds = shapeBounds = nowWorld;
11346
11344
  } else {
11347
11345
  const {renderShapeSpread: spread} = ui.__layout;
11348
- const worldClipBounds = getIntersectData(spread ? getSpread(current.bounds, scaleX === scaleY ? spread * scaleX : [ spread * scaleY, spread * scaleX ]) : current.bounds, nowWorld);
11349
- fitMatrix = current.bounds.getFitMatrix(worldClipBounds);
11346
+ let worldClipBounds;
11347
+ if (Platform.fullImageShadow) {
11348
+ worldClipBounds = nowWorld;
11349
+ } else {
11350
+ const spreadBounds = spread ? getSpread(currentBounds, scaleX === scaleY ? spread * scaleX : [ spread * scaleY, spread * scaleX ]) : currentBounds;
11351
+ worldClipBounds = getIntersectData(spreadBounds, nowWorld);
11352
+ }
11353
+ fitMatrix = currentBounds.getFitMatrix(worldClipBounds);
11350
11354
  let {a: fitScaleX, d: fitScaleY} = fitMatrix;
11351
11355
  if (fitMatrix.a < 1) {
11352
11356
  worldCanvas = current.getSameCanvas();