mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-05-15 16:01:07 -04:00
Fixed xml import/export in Playground
This commit is contained in:
parent
771f18e23b
commit
41082a76cd
2 changed files with 3 additions and 3 deletions
|
@ -56,7 +56,7 @@ var VirtualMachine = require('scratch-vm');
|
|||
var vm = new VirtualMachine();
|
||||
|
||||
// Block events
|
||||
workspace.addChangeListener(vm.blockListener);
|
||||
Scratch.workspace.addChangeListener(vm.blockListener);
|
||||
|
||||
// Run threads
|
||||
vm.start();
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
<script>
|
||||
function toXml() {
|
||||
var output = document.getElementById('importExport');
|
||||
var xml = Blockly.Xml.workspaceToDom(workspace);
|
||||
var xml = Blockly.Xml.workspaceToDom(Scratch.workspace);
|
||||
output.value = Blockly.Xml.domToPrettyText(xml);
|
||||
output.focus();
|
||||
output.select();
|
||||
|
@ -81,7 +81,7 @@
|
|||
function fromXml() {
|
||||
var input = document.getElementById('importExport');
|
||||
var xml = Blockly.Xml.textToDom(input.value);
|
||||
Blockly.Xml.domToWorkspace(workspace, xml);
|
||||
Blockly.Xml.domToWorkspace(Scratch.workspace, xml);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue