feat(front): show smallest screen indicator based on config

This commit is contained in:
Florent Chehab 2020-05-11 17:32:20 +02:00
parent 2dfb1079a7
commit 203e35b3e4
No known key found for this signature in database
GPG Key ID: 9A0CE018889EA246

View File

@ -3,6 +3,7 @@ import Point from "./classes/Point";
import ReadOnlyService from "./services/ReadOnlyService";
import InfoService from "./services/InfoService";
import ThrottlingService from "./services/ThrottlingService";
import ConfigService from "./services/ConfigService";
const RAD_TO_DEG = 180.0 / Math.PI;
const DEG_TO_RAD = Math.PI / 180.0;
@ -1031,7 +1032,8 @@ const whiteboard = {
},
updateSmallestScreenResolution() {
const { smallestScreenResolution } = InfoService;
if (smallestScreenResolution) {
const { showSmallestScreenIndicator } = ConfigService;
if (showSmallestScreenIndicator && smallestScreenResolution) {
const { w: width, h: height } = smallestScreenResolution;
this.backgroundGrid.empty();
if (width < $(window).width() || height < $(window).height()) {