when a node is being droped in the workspace recreate intellisense models

This commit is contained in:
Alexandru Stefan committed 2021-11-13 12:53:33 +02:00
1 parent be695ae192
commit f35492f544
2 files changed
+8 -1

No files matched your search

@@ -3,6 +3,7 @@ function newFoundationsCodeEditorEditorPage() {
originatingNode: undefined,
editorType: undefined,
render: render,
reset:reset,
initialize: initialize,
finalize: finalize
}
@@ -38,6 +39,10 @@ function newFoundationsCodeEditorEditorPage() {
}
function reset() {
finalize()
initialize()
}
function render(originatingNode, editorType) {
@@ -351,7 +356,6 @@ function newFoundationsCodeEditorEditorPage() {
objectMerge(chartMarketExchangeObj, stringRepresentation.split('.').reduceRight((o, x) => ({[x]: o}), ""))
})
console.log(chartMarketExchangeObj)
function objectMerge(target, source) {
for (const key of Object.keys(source)) {
@@ -705,6 +705,9 @@ function newWorkspace() {
executeAction({ node: droppedNode, name: 'Create UI Object', project: 'Visual-Scripting', extraParameter: positionOffset })
executeAction({ name: 'Connect Children to Reference Parents', project: 'Visual-Scripting' })
// Recreate autocomplete models
UI.projects.foundations.spaces.codeEditorSpace.editorPage.reset()
droppedNode = undefined
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] spawn -> err = ' + err.stack) }