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.cjs
CHANGED
|
@@ -123,7 +123,7 @@ class LeaferCanvas extends core.LeaferCanvasBase {
|
|
|
123
123
|
else {
|
|
124
124
|
window.addEventListener('resize', this.windowListener = () => {
|
|
125
125
|
const pixelRatio = core.Platform.devicePixelRatio;
|
|
126
|
-
if (this.pixelRatio !== pixelRatio) {
|
|
126
|
+
if (!this.config.pixelRatio && this.pixelRatio !== pixelRatio) {
|
|
127
127
|
const { width, height } = this;
|
|
128
128
|
this.emitResize({ width, height, pixelRatio });
|
|
129
129
|
}
|
|
@@ -140,7 +140,7 @@ class LeaferCanvas extends core.LeaferCanvasBase {
|
|
|
140
140
|
checkAutoBounds(parentSize) {
|
|
141
141
|
const view = this.view;
|
|
142
142
|
const { x, y, width, height } = this.autoBounds.getBoundsFrom(parentSize);
|
|
143
|
-
const size = { width, height, pixelRatio: core.Platform.devicePixelRatio };
|
|
143
|
+
const size = { width, height, pixelRatio: this.config.pixelRatio ? this.pixelRatio : core.Platform.devicePixelRatio };
|
|
144
144
|
if (!this.isSameSize(size)) {
|
|
145
145
|
const { style } = view;
|
|
146
146
|
style.marginLeft = x + 'px';
|