From 60d02a28f5ca486a627b7d61ede5172f89aef2a4 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 29 Jul 2020 21:56:32 +0200 Subject: [PATCH] made stack-highlights un-touchable --- HISTORY.md | 4 ++-- src/blocks.js | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 6876b0ea..a5ca089a 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -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 diff --git a/src/blocks.js b/src/blocks.js index b500a89b..a5091ca4 100644 --- a/src/blocks.js +++ b/src/blocks.js @@ -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; };