-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: support dragging comments in the gesture #7977
feat: support dragging comments in the gesture #7977
Conversation
5426568
to
76d6f03
Compare
core/gesture.ts
Outdated
@@ -427,6 +454,27 @@ export class Gesture { | |||
this.dragger.onDrag(e, this.currentDragDeltaXY); | |||
} | |||
|
|||
/** Start dragging the selected bubble. */ |
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.
bubble -> comment
core/gesture.ts
Outdated
} | ||
if (!this.startWorkspace_) { | ||
throw new Error( | ||
'Cannot update dragging the bubble because the start ' + |
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.
bubble -> comment
core/gesture.ts
Outdated
handleCommentStart(e: PointerEvent, comment: RenderedWorkspaceComment) { | ||
if (this.gestureHasStarted) { | ||
throw Error( | ||
'Tried to call gesture.handleBubbleStart, ' + |
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.
handleBubbleStart -> handleCommentStart
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 after you fix the naming issues in comments and warnings.
* feat: add dragging of comments in gesture * chore: fix naming problems
The basics
The details
Resolves
Fixes N/A
Proposed Changes
Makes it so the gesture handles starting drags on comments. The code for starting drags is going to get refactored an unified in a bit, but I wanted to be able to test the comment dragging before then.
Test Coverage
Manually tested, and drags to occur!
Documentation
N/A
Additional Information
N/A