new gesture: holding the shift-key when dragging extracts a single command from a stack of blocks

pull/95/head
jmoenig 2020-10-22 18:35:13 +02:00
rodzic a7d56450fe
commit 7f02cb5bca
2 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -2,10 +2,11 @@
## in development:
* **New Features:**
* new gesture: holding the shift-key when dragging extracts a single command from a stack of blocks
* new "extract" single command block context menu option
* added "pie chart" option to PLOT command in the frequency distribution analysis library
* added getProjectXML() method to the API
* new noCloud flag that disables cloud access, thanks, Bernat
* new "extract" single command block context menu option
* **Documentation Updates:**
* API update
* **Notable Fixes:**
@ -20,6 +21,7 @@
* blocks: refactored userDestroyJustThis
* blocks: un-hid "extract" menu-option
* morphic: create drop-shadows just in time
* blocks: holding the shift-key when dragging extracts a single command from a stack of blocks
### 2020-10-21
* gui: wait until all costumes have loaded before auto-triggering the green-flag event

Wyświetl plik

@ -5195,6 +5195,14 @@ CommandBlockMorph.prototype.snap = function (hand) {
};
CommandBlockMorph.prototype.prepareToBeGrabbed = function (handMorph) {
// check whether the shift-key is held down and if I can be "extracted"
if (handMorph && handMorph.world.currentKey === 16 && this.nextBlock()) {
this.extract(); // NOTE: no infinite recursion, because extract()
// doesn't call this again with a hand
handMorph.grabOrigin.action = 'extract'; // ???
return;
}
var oldPos = this.position();
if (this.parent instanceof RingReporterSlotMorph) {