Automatic changing time frame only with shift key
This commit is contained in:
1 parent
cf603ce8cd
commit
b38a91c591
2 files changed
+3
-1
No files matched your search
@@ -204,7 +204,8 @@ function newViewport () {
|
||||
let newEvent = {
|
||||
newLevel: thisObject.zoomTargetLevel,
|
||||
newPosition: position,
|
||||
type: undefined
|
||||
type: undefined,
|
||||
shiftKey: event.shiftKey
|
||||
}
|
||||
|
||||
if (amount > 0) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user