We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 956c956 + b3816b1 commit b8711f3Copy full SHA for b8711f3
1 file changed
src/mixins/DeviceDetector.js
@@ -1,4 +1,5 @@
1
export const MAX_MOBILE_WIDTH = 480;
2
+export const originalDevicePixelRatio = window.devicePixelRatio;
3
export default {
4
created() {
5
window.addEventListener("resize", this.resizeHandler);
@@ -20,7 +21,9 @@ export default {
20
21
const isModelerInspector = this.data && this.data.$type && this.data.$type.startsWith("bpmn:");
22
if (this.definition && !isModelerInspector) {
23
this.definition.isMobile =
- renderer && renderer.offsetWidth <= MAX_MOBILE_WIDTH;
24
+ renderer &&
25
+ renderer.offsetWidth <= MAX_MOBILE_WIDTH &&
26
+ originalDevicePixelRatio === window.devicePixelRatio;
27
}
28
29
0 commit comments