-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix: LEAP-2009: Respect granularity when resizing NER spans #7364
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
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for label-studio-docs-new-theme ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for heartex-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Otherwise it would hang the browser because of a very complex inner logic.
It fixes selection to point only to text nodes, so selection.move() will work properly. With non-text nodes it jumps into inner/outer nodes instead of shifting symbol by symbol.
/git merge
|
/fm sync |
/git merge
|
/fm sync |
Handles were messing up with ranges and selection, so we have to remove them earlier.
Fix to reuse the same funtionality we use in
captureSelection()
:trimSelection()
(the secret sauce!) to fix selection to point only to text nodes;applyTextGranularity()
to the selection expading it if neededWe need
trimSelection()
so selection.move() will work properly.With non-text nodes it jumps into inner/outer nodes instead of shifting symbol by symbol.
Also set cursor to "resize" for the whole document during resize.