kopia lustrzana https://github.com/backface/turtlestitch
added "loadProjectXML" method to the api
rodzic
3b951c4b65
commit
c1e49bbed2
|
@ -2,8 +2,12 @@
|
|||
|
||||
## in development:
|
||||
|
||||
* **Notable Changes:**
|
||||
* added "loadProjectXML" method to the api
|
||||
|
||||
### 2020-11-21
|
||||
* new dev version
|
||||
* api: new loadProjectXML() method
|
||||
|
||||
## 6.3.6
|
||||
* **Notable Changes:**
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<script src="src/store.js?version=2020-10-27"></script>
|
||||
<script src="src/locale.js?version=2020-11-20"></script>
|
||||
<script src="src/cloud.js?version=2020-10-21"></script>
|
||||
<script src="src/api.js?version=2020-11-18"></script>
|
||||
<script src="src/api.js?version=2020-11-21"></script>
|
||||
<script src="src/sha512.js?version=2019-06-27"></script>
|
||||
<script src="src/FileSaver.min.js?version=2019-06-27"></script>
|
||||
<script>
|
||||
|
|
11
src/api.js
11
src/api.js
|
@ -61,6 +61,7 @@
|
|||
Access the Serialized Project
|
||||
|
||||
- IDE_Morph.prototype.getProjectXML()
|
||||
- IDE_Morph.prototype.loadProjectXML(projectXML)
|
||||
|
||||
Getting hold of an ide can usually be achieved by
|
||||
evaluating:
|
||||
|
@ -204,7 +205,7 @@
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.api = '2020-November-18';
|
||||
modules.api = '2020-November-21';
|
||||
|
||||
// IDE_Morph external communication API - experimental
|
||||
/*
|
||||
|
@ -333,3 +334,11 @@ IDE_Morph.prototype.newList = function (array) {
|
|||
IDE_Morph.prototype.getProjectXML = function () {
|
||||
return this.serializer.serialize(this.stage);
|
||||
};
|
||||
|
||||
IDE_Morph.prototype.loadProjectXML = function (projectXML) {
|
||||
// load the project encoded as xml-String, no questions asked
|
||||
// terminate animations and scheduled ops
|
||||
this.onNextStep = null;
|
||||
this.world().animations = [];
|
||||
this.openProjectString(projectXML);
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue