Saving with CTRL S

This commit is contained in:
Luis Fernando Molina committed 2020-03-27 18:09:42 +01:00
1 parent 3824e910e2
commit 6322a5c002
2 files changed
+8 -1

No files matched your search

+6
View File
@@ -274,6 +274,12 @@ function newCanvas () {
return
}
if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && (event.key === 'S' || event.key === 's')) {
canvas.designSpace.workspace.save()
event.preventDefault()
return
}
let nodeOnFocus = canvas.designSpace.workspace.getNodeThatIsOnFocus()
if (nodeOnFocus !== undefined) {
if (nodeOnFocus.payload.uiObject.codeEditor !== undefined) {
+2 -1
View File
@@ -11,6 +11,7 @@ function newWorkspace () {
container: undefined,
enabled: false,
nodeChildren: undefined,
save: saveWorkspace,
getHierarchyHeads: getHierarchyHeads,
getNodeThatIsOnFocus: getNodeThatIsOnFocus,
getNodeByShortcutKey: getNodeByShortcutKey,
@@ -90,7 +91,7 @@ function newWorkspace () {
functionLibraryUiObjectsFromNodes.recreateWorkspace(thisObject.workspaceNode)
thisObject.enabled = true
setInterval(saveWorkspace, 10000)
setInterval(saveWorkspace, 60000)
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] initialize -> err = ' + err.stack) }
}