kopia lustrzana https://github.com/backface/turtlestitch
support bulk-file-drop for importing scenes
rodzic
e8900241e0
commit
9a8d0cb6ed
|
@ -8,6 +8,7 @@
|
|||
|
||||
### 2021-04-12
|
||||
* blocks, objects, threads, gui: new "switch to scene _" command primitive
|
||||
* morphic, gui: support bulk-file-drop for importing scenes
|
||||
|
||||
### 2021-04-08
|
||||
* gui: scroll selected scene icon into view
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Snap! 7 - dev - Build Your Own Blocks</title>
|
||||
<link rel="icon" href="src/favicon.ico">
|
||||
<script src="src/morphic.js?version=2021-02-10"></script>
|
||||
<script src="src/morphic.js?version=2021-04-12"></script>
|
||||
<script src="src/symbols.js?version=2021-03-03"></script>
|
||||
<script src="src/widgets.js?version=2021-01-05"></script>
|
||||
<script src="src/blocks.js?version=2021-04-12"></script>
|
||||
|
|
19
src/gui.js
19
src/gui.js
|
@ -293,6 +293,9 @@ IDE_Morph.prototype.init = function (isAutoFill) {
|
|||
|
||||
this.savingPreferences = true; // for bh's infamous "Eisenbergification"
|
||||
|
||||
this.bulkDropInProgress = false; // for handling multiple file-drops
|
||||
this.cachedSceneFlag = null; // for importing multiple scenes at once
|
||||
|
||||
// initialize inherited properties:
|
||||
IDE_Morph.uber.init.call(this);
|
||||
|
||||
|
@ -2196,6 +2199,17 @@ IDE_Morph.prototype.reactToWorldResize = function (rect) {
|
|||
}
|
||||
};
|
||||
|
||||
IDE_Morph.prototype.beginBulkDrop = function () {
|
||||
this.bulkDropInProgress = true;
|
||||
this.cachedSceneFlag = this.isAddingScenes;
|
||||
this.isAddingScenes = true;
|
||||
};
|
||||
|
||||
IDE_Morph.prototype.endBulkDrop = function () {
|
||||
this.isAddingScenes = this.cachedSceneFlag;
|
||||
this.bulkDropInProgress = false;
|
||||
};
|
||||
|
||||
IDE_Morph.prototype.droppedImage = function (aCanvas, name) {
|
||||
var costume = new Costume(
|
||||
aCanvas,
|
||||
|
@ -5111,6 +5125,11 @@ IDE_Morph.prototype.exportProjectSummary = function (useDropShadows) {
|
|||
|
||||
IDE_Morph.prototype.openProjectString = function (str, callback) {
|
||||
var msg;
|
||||
if (this.bulkDropInProgress) {
|
||||
this.rawOpenProjectString(str);
|
||||
if (callback) {callback(); }
|
||||
return;
|
||||
}
|
||||
this.nextSteps([
|
||||
() => msg = this.showMessage('Opening project...'),
|
||||
() => {
|
||||
|
|
Ładowanie…
Reference in New Issue