Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(annotations): Disable target pointer-events when explicit creation #1262

Merged
merged 3 commits into from
Sep 22, 2020

Conversation

ConradJChan
Copy link
Contributor

@ConradJChan ConradJChan commented Sep 22, 2020

When in explicit annotation creation mode (highlight or region), all existing annotation targets should not be interact-able.

@ConradJChan ConradJChan requested a review from a team as a code owner September 22, 2020 05:05

.annotationLayer {
.annotationLayer,
.ba-HighlightList .ba-HighlightSvg.is-listening .ba-HighlightTarget-rect,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love how specific this rule has to be to override the existing styles, but this can be updated if we can make the underlying style less specific

@ConradJChan ConradJChan changed the title feat(annotations): No other pointer events during create region feat(annotations): Disable target pointer-events when explicit creation Sep 22, 2020
@ConradJChan ConradJChan force-pushed the create-region-pointer-events branch from ab9aa32 to d912111 Compare September 22, 2020 17:34
@ConradJChan ConradJChan force-pushed the create-region-pointer-events branch from d912111 to 6a62874 Compare September 22, 2020 17:35
default:
this.containerEl.classList.remove(CLASS_ANNOTATIONS_CREATE_REGION);
break;
if (this.containerEl) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the enableAnnotationsDiscoveribility clause because these classes can be applied with or without that feature. This allows explicit creation modes to disable existing annotations interactivity irrespective of discoverability

@ConradJChan ConradJChan merged commit b2dcd45 into box:master Sep 22, 2020
@ConradJChan ConradJChan deleted the create-region-pointer-events branch September 22, 2020 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants