-
Notifications
You must be signed in to change notification settings - Fork 323
feat: DEV-2786: Adjustable draggable spans #756
base: master
Are you sure you want to change the base?
Conversation
Create selection with the same style as span at the selection start. This emulates span expansion by dragging from its edge.
- copy styles from span to selection - remember offsets - grey out the original span
…cted, change label to be over text and disappear on hover
…ove selection style functions
|
✅ Linked to DEV-2786 · Adjustable/draggable spans implementation |
yyassi-heartex
left a comment
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.
LGTM
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.
Found a couple of issues with the feature. Reported in #code-reviews.
…drag makes selection dragging and resize smooth
…eartexlabs/label-studio-frontend into fb-dev-2786/adjustable-draggable-spans
Use removeHighlight() and applyHighlight() for this. Fix removeHighlight() to do a good clean up.
It was impossible to drag small region because of resize handlers. Moving them outside of the span solves the problem.
bmartel
left a comment
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.
Looks great! Just a few suggestions to remove commented out code.
…eartexlabs/label-studio-frontend into fb-dev-2786/adjustable-draggable-spans
Suggested changes were applied.
|
/git merge master
|
…ble-draggable-spans
…ble-draggable-spans
…ble-draggable-spans
|
/git merge master
|
…ble-draggable-spans
…ble-draggable-spans
remove console
Add grabber handles on the front and back of each span, improve data label to allow for smoother drag, hide span on drag, replacing with selection of the same color, delete span on new range creation.