added gliding animation when inserting blocks using the keyboard

pull/89/head
jmoenig 2019-07-01 19:05:48 +02:00
rodzic f0c192778c
commit c5746036b8
3 zmienionych plików z 16 dodań i 2 usunięć

Wyświetl plik

@ -3,6 +3,7 @@
## in development:
* **New Features:**
* **Notable Changes:**
* gliding animation when inserting blocks using the keyboard
* **Notable Fixes:**
* list watchers occasionally didn't show cells after reassigning a changed list to a variable
* FOREACH over a linked list failed for scripts mutating it
@ -14,6 +15,7 @@
* threads: fixed an issue when iterating over a linked list with a script mutating it, thanks, Brian!
* cloud: fixed collection grid page size, thanks, Bernat!
* morphic: fixed a race condition in Morph.glideTo()
* blocks: added gliding animation when inserting blocks using the keyboard
## v5
### 2019-06-27

Wyświetl plik

@ -6,7 +6,7 @@
<link rel="shortcut icon" href="src/favicon.ico">
<script type="text/javascript" src="src/morphic.js?version=2019-07-01"></script>
<script type="text/javascript" src="src/widgets.js?version=2019-06-27"></script>
<script type="text/javascript" src="src/blocks.js?version=2019-06-27"></script>
<script type="text/javascript" src="src/blocks.js?version=2019-07-01"></script>
<script type="text/javascript" src="src/threads.js?version=2019-07-01"></script>
<script type="text/javascript" src="src/objects.js?version=2019-06-27"></script>
<script type="text/javascript" src="src/gui.js?version=2019-07-01"></script>

Wyświetl plik

@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/
// Global stuff ////////////////////////////////////////////////////////
modules.blocks = '2019-June-03';
modules.blocks = '2019-July-01';
var SyntaxElementMorph;
var BlockMorph;
@ -12886,6 +12886,18 @@ ScriptFocusMorph.prototype.deleteLastElement = function () {
};
ScriptFocusMorph.prototype.insertBlock = function (block) {
// insert the block after a short gliding animation
var myself = this;
this.world().add(block);
block.glideTo(
this.position(),
null,
null,
function () {myself.fillInBlock(block); }
);
};
ScriptFocusMorph.prototype.fillInBlock = function (block) {
var pb, stage, ide, rcvr;
block.isTemplate = false;
block.isDraggable = true;