made stack-highlights un-touchable

pull/95/head
jmoenig 2020-07-29 21:56:32 +02:00
rodzic 02ce2b9049
commit 60d02a28f5
2 zmienionych plików z 5 dodań i 7 usunięć

Wyświetl plik

@ -28,14 +28,14 @@
* fixed numeric input fields in dialog boxes
* fixed reacting to keyboard input in dialog boxes
* fixed zoom blocks type-in dialog
* added "hole" to stack-highlights to enable clicking inside open areas
* made stack-highlights un-touchable
* **Documentation Updates:**
* added migration guide for Morphic2/Snap!6
* **Translation Updates:**
* German
### 2020-07-29
* blocks: added "hole" to stack-highlights to enable clicking inside open areas
* blocks: made stack-highlights un-touchable
### 2020-07-28
* blocks: tweaked stack-highlight for (partially) faded blocks

Wyświetl plik

@ -4217,16 +4217,14 @@ BlockMorph.prototype.highlight = function (color, blur, border) {
var highlight = new BlockHighlightMorph(),
fb = this.fullBounds(),
edge = useBlurredShadows && !MorphicPreferences.isFlat ?
blur : border,
offset = new Point(edge, edge);
blur : border;
highlight.bounds.setExtent(fb.extent().add(edge * 2));
highlight.holes = [fb.translateBy(this.position().neg().add(offset))];
highlight.holes = [highlight.bounds]; // make the highlight untouchable
highlight.color = color;
highlight.cachedImage = useBlurredShadows && !MorphicPreferences.isFlat ?
this.highlightImageBlurred(color, blur)
: this.highlightImage(color, border);
highlight.setPosition(fb.origin.subtract(offset));
highlight.setPosition(fb.origin.subtract(new Point(edge, edge)));
return highlight;
};