Showing id when Period key pressed

This commit is contained in:
Luis Fernando Molina committed 2019-10-16 19:16:11 +02:00
1 parent e07a2f9263
commit 67c9b06cd6
1 file changed
+8
+8
View File
@@ -236,6 +236,14 @@ function newCanvas () {
return
}
if (event.code === 'Period') {
let nodeOnFocus = canvas.strategySpace.workspace.getNodeThatIsOnFocus()
if (nodeOnFocus !== undefined) {
nodeOnFocus.payload.uiObject.setValue('Id: ' + nodeOnFocus.id)
return
}
}
if (event.ctrlKey === true) {
if (event.keyCode >= 65 && event.keyCode <= 90) {
event.preventDefault()