leafer-ui 2.0.5 → 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/README.md +4 -1
- package/dist/web.cjs +6 -5
- package/dist/web.esm.js +7 -6
- package/dist/web.esm.min.js +1 -1
- package/dist/web.esm.min.js.map +1 -1
- package/dist/web.js +8 -6
- package/dist/web.min.cjs +1 -1
- package/dist/web.min.cjs.map +1 -1
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/dist/web.module.js +8 -6
- package/dist/web.module.min.js +1 -1
- package/dist/web.module.min.js.map +1 -1
- package/package.json +11 -11
package/dist/web.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
|
const debug$5 = Debug.get("LeaferCanvas");
|
|
7059
7059
|
|
|
@@ -7349,7 +7349,6 @@ defineKey(Platform, "devicePixelRatio", {
|
|
|
7349
7349
|
const {userAgent: userAgent} = navigator;
|
|
7350
7350
|
|
|
7351
7351
|
if (userAgent.indexOf("Firefox") > -1) {
|
|
7352
|
-
Platform.conicGradientRotate90 = true;
|
|
7353
7352
|
Platform.intWheelDeltaY = true;
|
|
7354
7353
|
Platform.syncDomFont = true;
|
|
7355
7354
|
} else if (/iPhone|iPad|iPod/.test(navigator.userAgent) || /Macintosh/.test(navigator.userAgent) && /Version\/[\d.]+.*Safari/.test(navigator.userAgent)) {
|
|
@@ -8737,6 +8736,7 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
8737
8736
|
createProxyData() {
|
|
8738
8737
|
return undefined;
|
|
8739
8738
|
}
|
|
8739
|
+
clearProxyData() {}
|
|
8740
8740
|
find(_condition, _options) {
|
|
8741
8741
|
return Plugin.need("find");
|
|
8742
8742
|
}
|
|
@@ -12337,17 +12337,19 @@ function image(ui, attrName, paint, boxBounds, firstUse) {
|
|
|
12337
12337
|
}
|
|
12338
12338
|
|
|
12339
12339
|
function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds) {
|
|
12340
|
+
let needUpdate = true;
|
|
12340
12341
|
const data = ui.__;
|
|
12341
12342
|
if (attrName === "fill" && !data.__naturalWidth) {
|
|
12342
12343
|
data.__naturalWidth = image.width / data.pixelRatio;
|
|
12343
12344
|
data.__naturalHeight = image.height / data.pixelRatio;
|
|
12344
12345
|
if (data.__autoSide) {
|
|
12345
12346
|
ui.forceUpdate("width");
|
|
12347
|
+
LeafHelper.updateBounds(ui);
|
|
12346
12348
|
if (ui.__proxyData) {
|
|
12347
12349
|
ui.setProxyAttr("width", data.width);
|
|
12348
12350
|
ui.setProxyAttr("height", data.height);
|
|
12349
12351
|
}
|
|
12350
|
-
|
|
12352
|
+
needUpdate = false;
|
|
12351
12353
|
}
|
|
12352
12354
|
}
|
|
12353
12355
|
if (!leafPaint.data) {
|
|
@@ -12357,7 +12359,7 @@ function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds
|
|
|
12357
12359
|
if (clip || opacity && opacity < 1 || blendMode) leafPaint.complex = clip ? 2 : true;
|
|
12358
12360
|
}
|
|
12359
12361
|
if (paint.filter) PaintImage.applyFilter(leafPaint, image, paint.filter, ui);
|
|
12360
|
-
return
|
|
12362
|
+
return needUpdate;
|
|
12361
12363
|
}
|
|
12362
12364
|
|
|
12363
12365
|
function onLoad(ui, event) {
|
|
@@ -12807,10 +12809,10 @@ const realFrom = {};
|
|
|
12807
12809
|
const realTo = {};
|
|
12808
12810
|
|
|
12809
12811
|
function conicGradient(paint, box) {
|
|
12810
|
-
let {from: from, to: to, type: type, opacity: opacity, stretch: stretch} = paint;
|
|
12812
|
+
let {from: from, to: to, type: type, opacity: opacity, rotation: rotation, stretch: stretch} = paint;
|
|
12811
12813
|
toPoint(from || "center", box, realFrom);
|
|
12812
12814
|
toPoint(to || "bottom", box, realTo);
|
|
12813
|
-
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));
|
|
12815
|
+
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));
|
|
12814
12816
|
const data = {
|
|
12815
12817
|
type: type,
|
|
12816
12818
|
style: style
|