summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blocks.js18
-rwxr-xr-xhistory.txt7
2 files changed, 21 insertions, 4 deletions
diff --git a/blocks.js b/blocks.js
index 1b1bc0f..e288a64 100644
--- a/blocks.js
+++ b/blocks.js
@@ -155,7 +155,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.blocks = '2013-July-15';
+modules.blocks = '2013-July-30';
var SyntaxElementMorph;
var BlockMorph;
@@ -4575,6 +4575,16 @@ ScriptsMorph.prototype.closestInput = function (reporter, hand) {
});
if (all.length === 0) {return null; }
+ function touchingVariadicArrowsIfAny(inp, point) {
+ if (inp instanceof MultiArgMorph) {
+ if (point) {
+ return inp.arrows().bounds.containsPoint(point);
+ }
+ return inp.arrows().bounds.intersects(fb);
+ }
+ return true;
+ }
+
if (this.isPreferringEmptySlots) {
if (hand) {
handPos = hand.position();
@@ -4588,7 +4598,8 @@ ScriptsMorph.prototype.closestInput = function (reporter, hand) {
|| input.isEmptySlot())
&& !input.isLocked()
&& input.bounds.containsPoint(handPos)
- && !contains(blackList, input);
+ && !contains(blackList, input)
+ && touchingVariadicArrowsIfAny(input, handPos);
}
);
if (target) {
@@ -4605,7 +4616,8 @@ ScriptsMorph.prototype.closestInput = function (reporter, hand) {
|| input.isEmptySlot())
&& !input.isLocked()
&& input.bounds.intersects(fb)
- && !contains(blackList, input);
+ && !contains(blackList, input)
+ && touchingVariadicArrowsIfAny(input);
}
);
if (target) {
diff --git a/history.txt b/history.txt
index a28da7d..593c1cd 100755
--- a/history.txt
+++ b/history.txt
@@ -1822,4 +1822,9 @@ ______
130724
------
-* Dutch translation, yay!! Thanks, Frank Sierens \ No newline at end of file
+* Dutch translation, yay!! Thanks, Frank Sierens
+
+130730
+------
+* Blocks: Made it harder to drop reporters on the variadic input per se (as opposed to into one of its slots) in (default) "prefer empty slot drops" setting
+