Skip to content

Commit b8711f3

Browse files
authored
Merge pull request #1782 from ProcessMaker/bugfix/FOUR-19561
FOUR-19561: In a screen with more than one page, when I zoom more than 150% I return to the first page
2 parents 956c956 + b3816b1 commit b8711f3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/mixins/DeviceDetector.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export const MAX_MOBILE_WIDTH = 480;
2+
export const originalDevicePixelRatio = window.devicePixelRatio;
23
export default {
34
created() {
45
window.addEventListener("resize", this.resizeHandler);
@@ -20,7 +21,9 @@ export default {
2021
const isModelerInspector = this.data && this.data.$type && this.data.$type.startsWith("bpmn:");
2122
if (this.definition && !isModelerInspector) {
2223
this.definition.isMobile =
23-
renderer && renderer.offsetWidth <= MAX_MOBILE_WIDTH;
24+
renderer &&
25+
renderer.offsetWidth <= MAX_MOBILE_WIDTH &&
26+
originalDevicePixelRatio === window.devicePixelRatio;
2427
}
2528
}
2629
}

0 commit comments

Comments
 (0)