@leafer-ui/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 +10 -10
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() {
|
|
@@ -8696,6 +8696,7 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
8696
8696
|
createProxyData() {
|
|
8697
8697
|
return undefined;
|
|
8698
8698
|
}
|
|
8699
|
+
clearProxyData() {}
|
|
8699
8700
|
find(_condition, _options) {
|
|
8700
8701
|
return Plugin.need("find");
|
|
8701
8702
|
}
|
|
@@ -12075,17 +12076,19 @@ function image(ui, attrName, paint, boxBounds, firstUse) {
|
|
|
12075
12076
|
}
|
|
12076
12077
|
|
|
12077
12078
|
function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds) {
|
|
12079
|
+
let needUpdate = true;
|
|
12078
12080
|
const data = ui.__;
|
|
12079
12081
|
if (attrName === "fill" && !data.__naturalWidth) {
|
|
12080
12082
|
data.__naturalWidth = image.width / data.pixelRatio;
|
|
12081
12083
|
data.__naturalHeight = image.height / data.pixelRatio;
|
|
12082
12084
|
if (data.__autoSide) {
|
|
12083
12085
|
ui.forceUpdate("width");
|
|
12086
|
+
LeafHelper.updateBounds(ui);
|
|
12084
12087
|
if (ui.__proxyData) {
|
|
12085
12088
|
ui.setProxyAttr("width", data.width);
|
|
12086
12089
|
ui.setProxyAttr("height", data.height);
|
|
12087
12090
|
}
|
|
12088
|
-
|
|
12091
|
+
needUpdate = false;
|
|
12089
12092
|
}
|
|
12090
12093
|
}
|
|
12091
12094
|
if (!leafPaint.data) {
|
|
@@ -12095,7 +12098,7 @@ function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds
|
|
|
12095
12098
|
if (clip || opacity && opacity < 1 || blendMode) leafPaint.complex = clip ? 2 : true;
|
|
12096
12099
|
}
|
|
12097
12100
|
if (paint.filter) PaintImage.applyFilter(leafPaint, image, paint.filter, ui);
|
|
12098
|
-
return
|
|
12101
|
+
return needUpdate;
|
|
12099
12102
|
}
|
|
12100
12103
|
|
|
12101
12104
|
function onLoad(ui, event) {
|
|
@@ -12545,10 +12548,10 @@ const realFrom = {};
|
|
|
12545
12548
|
const realTo = {};
|
|
12546
12549
|
|
|
12547
12550
|
function conicGradient(paint, box) {
|
|
12548
|
-
let {from: from, to: to, type: type, opacity: opacity, stretch: stretch} = paint;
|
|
12551
|
+
let {from: from, to: to, type: type, opacity: opacity, rotation: rotation, stretch: stretch} = paint;
|
|
12549
12552
|
toPoint(from || "center", box, realFrom);
|
|
12550
12553
|
toPoint(to || "bottom", box, realTo);
|
|
12551
|
-
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));
|
|
12554
|
+
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));
|
|
12552
12555
|
const data = {
|
|
12553
12556
|
type: type,
|
|
12554
12557
|
style: style
|