@leafer-ui/miniapp 1.5.0 → 1.5.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.module.js
CHANGED
|
@@ -2029,13 +2029,11 @@ class LeaferCanvasBase extends Canvas$1 {
|
|
|
2029
2029
|
this.worldTransform = {};
|
|
2030
2030
|
if (!config)
|
|
2031
2031
|
config = minSize;
|
|
2032
|
-
if (!config.pixelRatio)
|
|
2033
|
-
config.pixelRatio = Platform.devicePixelRatio;
|
|
2034
2032
|
this.manager = manager;
|
|
2035
2033
|
this.innerId = IncrementId.create(IncrementId.CNAVAS);
|
|
2036
2034
|
const { width, height, pixelRatio } = config;
|
|
2037
2035
|
this.autoLayout = !width || !height;
|
|
2038
|
-
this.size.pixelRatio = pixelRatio;
|
|
2036
|
+
this.size.pixelRatio = pixelRatio | Platform.devicePixelRatio;
|
|
2039
2037
|
this.config = config;
|
|
2040
2038
|
this.init();
|
|
2041
2039
|
}
|
|
@@ -2232,7 +2230,7 @@ class LeaferCanvasBase extends Canvas$1 {
|
|
|
2232
2230
|
tempBounds$1.ceil();
|
|
2233
2231
|
}
|
|
2234
2232
|
isSameSize(size) {
|
|
2235
|
-
return this.width === size.width && this.height === size.height && this.pixelRatio === size.pixelRatio;
|
|
2233
|
+
return this.width === size.width && this.height === size.height && (!size.pixelRatio || this.pixelRatio === size.pixelRatio);
|
|
2236
2234
|
}
|
|
2237
2235
|
getSameCanvas(useSameWorldTransform, useSameSmooth) {
|
|
2238
2236
|
const canvas = this.manager ? this.manager.get(this.size) : Creator.canvas(Object.assign({}, this.size));
|
|
@@ -4073,9 +4071,7 @@ function defineDataProcessor(target, key, defaultValue) {
|
|
|
4073
4071
|
else if (typeof defaultValue === 'function') {
|
|
4074
4072
|
property.get = function () {
|
|
4075
4073
|
let v = this[computedKey];
|
|
4076
|
-
|
|
4077
|
-
this[computedKey] = v = defaultValue(this.__leaf);
|
|
4078
|
-
return v;
|
|
4074
|
+
return v === undefined ? defaultValue(this.__leaf) : v;
|
|
4079
4075
|
};
|
|
4080
4076
|
}
|
|
4081
4077
|
if (key === 'width') {
|
|
@@ -6051,7 +6047,7 @@ class LeafLevelList {
|
|
|
6051
6047
|
}
|
|
6052
6048
|
}
|
|
6053
6049
|
|
|
6054
|
-
const version = "1.5.
|
|
6050
|
+
const version = "1.5.1";
|
|
6055
6051
|
|
|
6056
6052
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6057
6053
|
get allowBackgroundColor() { return false; }
|