@leafer-draw/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.
- package/dist/miniapp.cjs +11 -7
- package/dist/miniapp.esm.js +11 -7
- package/dist/miniapp.esm.min.js +1 -1
- package/dist/miniapp.esm.min.js.map +1 -1
- package/dist/miniapp.min.cjs +1 -1
- package/dist/miniapp.min.cjs.map +1 -1
- package/dist/miniapp.module.js +14 -10
- package/dist/miniapp.module.min.js +1 -1
- package/dist/miniapp.module.min.js.map +1 -1
- package/package.json +9 -9
package/dist/miniapp.module.js
CHANGED
|
@@ -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
|
|
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.
|
|
6694
|
+
const version = "1.9.1";
|
|
6695
6695
|
|
|
6696
6696
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6697
6697
|
get allowBackgroundColor() {
|
|
@@ -9225,7 +9225,7 @@ let Text = class Text extends UI {
|
|
|
9225
9225
|
data.__letterSpacing = UnitConvert.number(letterSpacing, fontSize);
|
|
9226
9226
|
data.__padding = padding ? MathHelper.fourNumber(padding) : undefined;
|
|
9227
9227
|
data.__baseLine = data.__lineHeight - (data.__lineHeight - fontSize * .7) / 2;
|
|
9228
|
-
data.__font = `${italic ? "italic " : ""}${textCase === "small-caps" ? "small-caps " : ""}${fontWeight !== "normal" ? fontWeight + " " : ""}${fontSize}px ${fontFamily}`;
|
|
9228
|
+
data.__font = `${italic ? "italic " : ""}${textCase === "small-caps" ? "small-caps " : ""}${fontWeight !== "normal" ? fontWeight + " " : ""}${fontSize || 12}px ${fontFamily || "caption"}`;
|
|
9229
9229
|
data.__clipText = textOverflow !== "show" && !data.__autoSize;
|
|
9230
9230
|
data.__textDrawData = TextConvert.getDrawData((data.__isPlacehold = data.placeholder && data.text === "") ? data.placeholder : data.text, this.__);
|
|
9231
9231
|
}
|
|
@@ -9638,18 +9638,22 @@ const {getSpread: getSpread, getOuterOf: getOuterOf, getByMove: getByMove, getIn
|
|
|
9638
9638
|
|
|
9639
9639
|
function shape(ui, current, options) {
|
|
9640
9640
|
const canvas = current.getSameCanvas();
|
|
9641
|
-
const nowWorld = ui.__nowWorld;
|
|
9641
|
+
const nowWorld = ui.__nowWorld, currentBounds = current.bounds;
|
|
9642
9642
|
let bounds, matrix, fitMatrix, shapeBounds, worldCanvas;
|
|
9643
|
-
let {scaleX: scaleX, scaleY: scaleY} =
|
|
9644
|
-
if (
|
|
9645
|
-
if (scaleY < 0) scaleY = -scaleY;
|
|
9646
|
-
if (current.bounds.includes(nowWorld)) {
|
|
9643
|
+
let {scaleX: scaleX, scaleY: scaleY} = ui.getRenderScaleData(true);
|
|
9644
|
+
if (currentBounds.includes(nowWorld)) {
|
|
9647
9645
|
worldCanvas = canvas;
|
|
9648
9646
|
bounds = shapeBounds = nowWorld;
|
|
9649
9647
|
} else {
|
|
9650
9648
|
const {renderShapeSpread: spread} = ui.__layout;
|
|
9651
|
-
|
|
9652
|
-
|
|
9649
|
+
let worldClipBounds;
|
|
9650
|
+
if (Platform.fullImageShadow) {
|
|
9651
|
+
worldClipBounds = nowWorld;
|
|
9652
|
+
} else {
|
|
9653
|
+
const spreadBounds = spread ? getSpread(currentBounds, scaleX === scaleY ? spread * scaleX : [ spread * scaleY, spread * scaleX ]) : currentBounds;
|
|
9654
|
+
worldClipBounds = getIntersectData(spreadBounds, nowWorld);
|
|
9655
|
+
}
|
|
9656
|
+
fitMatrix = currentBounds.getFitMatrix(worldClipBounds);
|
|
9653
9657
|
let {a: fitScaleX, d: fitScaleY} = fitMatrix;
|
|
9654
9658
|
if (fitMatrix.a < 1) {
|
|
9655
9659
|
worldCanvas = current.getSameCanvas();
|