Bug Fixed
This commit is contained in:
1 parent
28b5a2dff5
commit
23cc4d52b7
1 file changed
+9
-12
@@ -186,6 +186,15 @@ function newCanvas () {
|
||||
}
|
||||
|
||||
function onKeyDown (event) {
|
||||
let nodeOnFocus = canvas.strategySpace.workspace.getNodeThatIsOnFocus()
|
||||
if (nodeOnFocus !== undefined) {
|
||||
if (nodeOnFocus.payload.uiObject.codeEditor !== undefined) {
|
||||
if (nodeOnFocus.payload.uiObject.codeEditor.visible === true) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (event.altKey === true && event.code === 'ArrowUp') {
|
||||
thisObject.cockpitSpace.toTop()
|
||||
return
|
||||
@@ -237,13 +246,7 @@ function newCanvas () {
|
||||
}
|
||||
|
||||
if (event.code === 'Period') {
|
||||
let nodeOnFocus = canvas.strategySpace.workspace.getNodeThatIsOnFocus()
|
||||
if (nodeOnFocus !== undefined) {
|
||||
if (nodeOnFocus.payload.uiObject.codeEditor !== undefined) {
|
||||
if (nodeOnFocus.payload.uiObject.codeEditor.visible === true) {
|
||||
return
|
||||
}
|
||||
}
|
||||
nodeOnFocus.payload.uiObject.setValue('Id: ' + nodeOnFocus.id)
|
||||
return
|
||||
}
|
||||
@@ -251,7 +254,6 @@ function newCanvas () {
|
||||
|
||||
if (event.ctrlKey === true) {
|
||||
if (event.keyCode >= 65 && event.keyCode <= 90) {
|
||||
let nodeOnFocus = canvas.strategySpace.workspace.getNodeThatIsOnFocus()
|
||||
let nodeUsingThisKey = canvas.strategySpace.workspace.getNodeByShortcutKey(event.key)
|
||||
|
||||
if (nodeOnFocus === undefined) {
|
||||
@@ -259,11 +261,6 @@ function newCanvas () {
|
||||
nodeUsingThisKey = canvas.floatingSpace.positionAtNode(nodeUsingThisKey)
|
||||
return
|
||||
}
|
||||
if (nodeOnFocus.payload.uiObject.codeEditor !== undefined) {
|
||||
if (nodeOnFocus.payload.uiObject.codeEditor.visible === true) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
/* From here we prevent the default behaviour */
|
||||
event.preventDefault()
|
||||
|
||||
Reference in new issue
Block a user