Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

fix: Image interaction skip behavior #1468

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MaierN
Copy link
Contributor

@MaierN MaierN commented Jun 18, 2023

PR fulfills these requirements

  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Frontend

What does this fix?

Bug was that drawing a polygon overlapping an existing one wasn't working properly. Even when pressing the 'ctrl' key to disable interactions, the existing polygon was getting selected/unselected at each click. This was because the 'skipInteraction' flag was set by the ctrl key, and then overwritten by the click (the Image model couldn't keep track if the interactions were to be skipped for multiple reasons at the same time).

With the fix, the Image model can keep track of multiple reasons for the interaction skip, therefore avoiding the flag to be overwritten.

In addition, I added the 'shouldSkipInteractions' in the polygon tool to skip interactions when we already started drawing a new polygon (preventing the need to hold the 'ctrl' key the whole time when drawing overlapping polygons).

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

@github-actions github-actions bot added the fix label Jun 18, 2023
@MaierN MaierN changed the title fix: ImageView interaction skip behavior fix: Image interaction skip behavior Jun 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant