mobility-toolbox-js 3.1.0-beta.0 → 3.1.0-beta.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/common/utils/renderTrajectories.js +4 -1
- package/mbt.js +1 -1
- package/mbt.js.map +2 -2
- package/mbt.min.js +1 -1
- package/mbt.min.js.map +2 -2
- package/package.json +1 -1
|
@@ -28,7 +28,10 @@ const renderTrajectories = (canvas, trajectories, style, viewState, options) =>
|
|
|
28
28
|
const context = canvas.getContext('2d');
|
|
29
29
|
context === null || context === void 0 ? void 0 : context.clearRect(0, 0, canvas.width, canvas.height);
|
|
30
30
|
const [width, height] = size;
|
|
31
|
-
if (width &&
|
|
31
|
+
if (width &&
|
|
32
|
+
height &&
|
|
33
|
+
(canvas.width !== width * pixelRatio ||
|
|
34
|
+
canvas.height !== height * pixelRatio)) {
|
|
32
35
|
[canvas.width, canvas.height] = [width * pixelRatio, height * pixelRatio];
|
|
33
36
|
}
|
|
34
37
|
const coordinateToPixelTransform = compose(create(), size[0] / 2, size[1] / 2, 1 / resolution, -1 / resolution, -rotation, -center[0], -center[1]);
|
package/mbt.js
CHANGED
|
@@ -25318,7 +25318,7 @@ uniform ${i3} ${a3} u_${s3};
|
|
|
25318
25318
|
const context = canvas2.getContext("2d");
|
|
25319
25319
|
context?.clearRect(0, 0, canvas2.width, canvas2.height);
|
|
25320
25320
|
const [width, height] = size;
|
|
25321
|
-
if (width && height && (canvas2.width !== width || canvas2.height !== height)) {
|
|
25321
|
+
if (width && height && (canvas2.width !== width * pixelRatio || canvas2.height !== height * pixelRatio)) {
|
|
25322
25322
|
[canvas2.width, canvas2.height] = [width * pixelRatio, height * pixelRatio];
|
|
25323
25323
|
}
|
|
25324
25324
|
const coordinateToPixelTransform = compose(
|