Automatic changing time frame only with shift key

This commit is contained in:
Luis Fernando Molina committed 2020-01-20 10:14:28 +01:00
1 parent cf603ce8cd
commit b38a91c591
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -204,7 +204,8 @@ function newViewport () {
let newEvent = {
newLevel: thisObject.zoomTargetLevel,
newPosition: position,
type: undefined
type: undefined,
shiftKey: event.shiftKey
}
if (amount > 0) {
+1
View File
@@ -179,6 +179,7 @@ function newTimeFrameScale () {
function onViewportZoomChanged (event) {
if (event !== undefined) { // it is undefined when the level is just being animated.
if (event.shiftKey === false) { return } // with no shft key pressed, no automatic change in scale
let currentTimeFrame = thisObject.timeFrame
let timeFrame = recalculatePeriod(event.newLevel)
if (timeFrame !== currentTimeFrame) {