@leafer-draw/miniapp 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.
- package/dist/miniapp.cjs +6 -4
- package/dist/miniapp.esm.js +7 -5
- 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 +8 -5
- package/dist/miniapp.module.min.js +1 -1
- package/dist/miniapp.module.min.js.map +1 -1
- package/package.json +7 -7
package/dist/miniapp.module.js
CHANGED
|
@@ -7053,7 +7053,7 @@ class LeafLevelList {
|
|
|
7053
7053
|
}
|
|
7054
7054
|
}
|
|
7055
7055
|
|
|
7056
|
-
const version = "2.0.
|
|
7056
|
+
const version = "2.0.6";
|
|
7057
7057
|
|
|
7058
7058
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
7059
7059
|
get allowBackgroundColor() {
|
|
@@ -8496,6 +8496,7 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
8496
8496
|
createProxyData() {
|
|
8497
8497
|
return undefined;
|
|
8498
8498
|
}
|
|
8499
|
+
clearProxyData() {}
|
|
8499
8500
|
find(_condition, _options) {
|
|
8500
8501
|
return Plugin.need("find");
|
|
8501
8502
|
}
|
|
@@ -10247,17 +10248,19 @@ function image(ui, attrName, paint, boxBounds, firstUse) {
|
|
|
10247
10248
|
}
|
|
10248
10249
|
|
|
10249
10250
|
function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds) {
|
|
10251
|
+
let needUpdate = true;
|
|
10250
10252
|
const data = ui.__;
|
|
10251
10253
|
if (attrName === "fill" && !data.__naturalWidth) {
|
|
10252
10254
|
data.__naturalWidth = image.width / data.pixelRatio;
|
|
10253
10255
|
data.__naturalHeight = image.height / data.pixelRatio;
|
|
10254
10256
|
if (data.__autoSide) {
|
|
10255
10257
|
ui.forceUpdate("width");
|
|
10258
|
+
LeafHelper.updateBounds(ui);
|
|
10256
10259
|
if (ui.__proxyData) {
|
|
10257
10260
|
ui.setProxyAttr("width", data.width);
|
|
10258
10261
|
ui.setProxyAttr("height", data.height);
|
|
10259
10262
|
}
|
|
10260
|
-
|
|
10263
|
+
needUpdate = false;
|
|
10261
10264
|
}
|
|
10262
10265
|
}
|
|
10263
10266
|
if (!leafPaint.data) {
|
|
@@ -10267,7 +10270,7 @@ function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds
|
|
|
10267
10270
|
if (clip || opacity && opacity < 1 || blendMode) leafPaint.complex = clip ? 2 : true;
|
|
10268
10271
|
}
|
|
10269
10272
|
if (paint.filter) PaintImage.applyFilter(leafPaint, image, paint.filter, ui);
|
|
10270
|
-
return
|
|
10273
|
+
return needUpdate;
|
|
10271
10274
|
}
|
|
10272
10275
|
|
|
10273
10276
|
function onLoad(ui, event) {
|
|
@@ -10717,10 +10720,10 @@ const realFrom = {};
|
|
|
10717
10720
|
const realTo = {};
|
|
10718
10721
|
|
|
10719
10722
|
function conicGradient(paint, box) {
|
|
10720
|
-
let {from: from, to: to, type: type, opacity: opacity, stretch: stretch} = paint;
|
|
10723
|
+
let {from: from, to: to, type: type, opacity: opacity, rotation: rotation, stretch: stretch} = paint;
|
|
10721
10724
|
toPoint(from || "center", box, realFrom);
|
|
10722
10725
|
toPoint(to || "bottom", box, realTo);
|
|
10723
|
-
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));
|
|
10726
|
+
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));
|
|
10724
10727
|
const data = {
|
|
10725
10728
|
type: type,
|
|
10726
10729
|
style: style
|