Improvement arrow keys to move charts
This commit is contained in:
1 parent
df176c3a18
commit
d4f6394a52
5 files changed
+72
-15
No files matched your search
@@ -19,6 +19,7 @@ function newChartingSpace () {
|
||||
timeMachines: undefined,
|
||||
viewport: undefined,
|
||||
payload: undefined,
|
||||
onKeyPressed: onKeyPressed,
|
||||
reset: reset,
|
||||
oneScreenUp: oneScreenUp,
|
||||
oneScreenDown: oneScreenDown,
|
||||
@@ -263,6 +264,16 @@ function newChartingSpace () {
|
||||
syncWithDesigner()
|
||||
}
|
||||
|
||||
function onKeyPressed (event) {
|
||||
if (thisObject.visible !== true) { return }
|
||||
for (let j = 0; j < thisObject.timeMachines.length; j++) {
|
||||
let timeMachine = thisObject.timeMachines[j]
|
||||
if (timeMachine.onFocus === true) {
|
||||
timeMachine.onKeyPressed(event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function syncWithDesigner () {
|
||||
if (thisObject.payload === undefined) { return }
|
||||
if (thisObject.payload.node === undefined) { return }
|
||||
|
||||
Reference in new issue
Block a user