mac bug fixed

This commit is contained in:
Luis Fernando Molina committed 2020-03-27 17:42:20 +01:00
1 parent 50f66656b2
commit ae653d96b9
4 files changed
+16 -3

No files matched your search

+6 -1
View File
@@ -201,6 +201,11 @@ function newViewport () {
if ((event.ctrlKey === true || event.metaKey === true)) { return }
let morePower = 1
let amount = event.delta
if (IS_MAC) {
event.delta = event.delta * MAC_AMOUNT_FACTOR
}
if (event.buttons === 4) { morePower = 2 } // Mouse wheel pressed.
/* We adjust the sensitivity for Mac Users */
@@ -220,7 +225,7 @@ function newViewport () {
if (thisObject.zoomTargetLevel + amount * morePower < MIN_ZOOM_LEVEL) {
return false
}
thisObject.zoomTargetLevel = Math.round(Math.round((thisObject.zoomTargetLevel + amount * morePower) * MAC_AMOUNT_FACTOR) / MAC_AMOUNT_FACTOR)
thisObject.zoomTargetLevel = Math.round(thisObject.zoomTargetLevel + amount * morePower)
ANIMATION_INCREMENT = Math.round(Math.abs(thisObject.zoomTargetLevel - thisObject.zoomLevel) / ANIMATION_STEPS * 100) / 100
+2
View File
@@ -46,6 +46,8 @@ function newSystemEventHandler () {
if (WEB_SOCKETS_CONNECTION.readyState === 1) { // 1 means connected and ready.
WEB_SOCKETS_CONNECTION.send(JSON.stringify(command))
} else {
console.log('WebSocket message could not be sent because the connection was not ready. Message = ' + JSON.stringify(command))
}
}
@@ -580,8 +580,10 @@
/* Situation Name */
let digit = record.begin.toFixed(0).substring(7,8)
let positionY = recordPoint3.y - (recordPoint3.y - recordPoint1.y) / 2 + (Number(digit) * 10 - 50)
printLabel(record.triggerOnSituation, recordPoint1.x + 5, positionY , '1', 12);
let positionY = recordPoint3.y - (recordPoint3.y - recordPoint1.y) / 2 + (Number(digit) * 10 - 50)
if (record.triggerOnSituation !== "My Situation") {
printLabel(record.triggerOnSituation, recordPoint1.x + 5, positionY, '1', 12);
}
/* Draw the Sticks */
@@ -522,6 +522,10 @@
let line1 = '';
let line2 = '';
if (line0 === 'My Situation') {
line0 = ''
}
if (record.status === 1) {
switch (record.exitType) {
case 1: {