add ability to refresh workspace for current editing target
This commit is contained in:
1 parent
93bac9ad85
commit
2fb502fb70
1 file changed
+11
@@ -469,6 +469,17 @@ class VirtualMachine extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Repopulate the workspace with the blocks of the current editingTarget. This
|
||||
* allows us to get around bugs like gui#413.
|
||||
*/
|
||||
refreshWorkspace () {
|
||||
if (this.editingTarget) {
|
||||
this.emitWorkspaceUpdate();
|
||||
this.runtime.setEditingTarget(this.editingTarget);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emit metadata about available targets.
|
||||
* An editor UI could use this to display a list of targets and show
|
||||
|
||||
Reference in new issue
Block a user