Skip to content

Commit

Permalink
return ruler to toolbox when it's center point is inside the toolbox, #…
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Dec 23, 2021
1 parent c1f61d2 commit 3756b7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/common/view/GORulerNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ class GORulerNode extends Node {
transform: zoomTransformProperty.value,
start: () => this.moveToFront(),

// Return the ruler to the toolbox
// Return the ruler to the toolbox if the ruler's center point is inside the toolbox.
end: () => {
if ( this.toolboxBounds.intersectsBounds( this.bounds ) ) {
if ( this.toolboxBounds.containsPoint( this.center ) ) {
ruler.visibleProperty.value = false;
this.iconNode.focus();
}
Expand Down

0 comments on commit 3756b7e

Please sign in to comment.