leafer-draw 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/web.cjs +2 -2
- package/dist/web.cjs.map +1 -1
- package/dist/web.esm.js +2 -2
- package/dist/web.esm.js.map +1 -1
- package/dist/web.esm.min.js +1 -1
- package/dist/web.esm.min.js.map +1 -1
- package/dist/web.js +6 -10
- package/dist/web.js.map +1 -1
- 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 +6 -10
- package/dist/web.module.js.map +1 -1
- package/dist/web.module.min.js +1 -1
- package/dist/web.module.min.js.map +1 -1
- package/package.json +2 -2
package/dist/web.esm.js
CHANGED
|
@@ -124,7 +124,7 @@ class LeaferCanvas extends LeaferCanvasBase {
|
|
|
124
124
|
else {
|
|
125
125
|
window.addEventListener('resize', this.windowListener = () => {
|
|
126
126
|
const pixelRatio = Platform.devicePixelRatio;
|
|
127
|
-
if (this.pixelRatio !== pixelRatio) {
|
|
127
|
+
if (!this.config.pixelRatio && this.pixelRatio !== pixelRatio) {
|
|
128
128
|
const { width, height } = this;
|
|
129
129
|
this.emitResize({ width, height, pixelRatio });
|
|
130
130
|
}
|
|
@@ -141,7 +141,7 @@ class LeaferCanvas extends LeaferCanvasBase {
|
|
|
141
141
|
checkAutoBounds(parentSize) {
|
|
142
142
|
const view = this.view;
|
|
143
143
|
const { x, y, width, height } = this.autoBounds.getBoundsFrom(parentSize);
|
|
144
|
-
const size = { width, height, pixelRatio: Platform.devicePixelRatio };
|
|
144
|
+
const size = { width, height, pixelRatio: this.config.pixelRatio ? this.pixelRatio : Platform.devicePixelRatio };
|
|
145
145
|
if (!this.isSameSize(size)) {
|
|
146
146
|
const { style } = view;
|
|
147
147
|
style.marginLeft = x + 'px';
|