-
Notifications
You must be signed in to change notification settings - Fork 119
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
Fix hotkeys for Multi images (Compound files) #1561
Conversation
@@ -1733,6 +1741,10 @@ export default Vue.extend({ | |||
|
|||
this.setupHotkeys(this.hotkeyListenerScope) | |||
|
|||
if ( this.is_active ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once image annotation components are mounted, need to activate registered hotkeys ofr the active one.
} | ||
if ( this.is_active) { | ||
this.hotkey_listener.setScopes([this.hotkeyListenerScope]) | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The else block is needed for situations when user annotates in the compound context. For example text_annotation component currently uses a different mechanism for registering hotkeys. If user switches from image annotation to text in the same compound context, we needs to deactivate image annotation hotkeys.
Hey Anthony, I'm not removing old hotkey manager class because it looks like it's still used by text_annotation_core component. Please see |
Makes sense regarding keeping legacy Tested manually and appears all working as expected now, thanks Sergey! |
One small note for future is when we do remove legacy (Edit: That's my interpretation and agreement of your idea (re: thin leaf nodes) from prior call) |
Description
Fix a bug with hotkeys that happens in compound file context with multiple images. Updated HotkeyListener documentation to make it easier to use.
Bug Description:
Pressing a hotkey makes registered hotkey callbacks fire for all the image annotation panes