google/blockly

Move logic from `startDrag` and `moveDrag` into a utils file

Closed this issue · 2 comments

Check for duplicates

  • I have searched for similar issues before opening a new one.

Problem

The startDrag and moveDrag methods help you track the state of a drag (e.g. the total delta). Currently they exist on the workspace, and record state on the workspace, even though these methods are only used for resizing comments (block and workspace). E.g. block drags and workspace drags use other methods.

Request

Pull the logic from these methods into a utils file. Unify with other code for recording drags if possible and useful. Have these methods defer to the utils file (since they are public and deleting them is a breaking change).

Alternatives considered

Leave as is because it's not a big deal.

Additional context

No response

Hey @BeksOmega I would love to solve this issue

Go for it @Apocalypse96 This should be merged into develop and it shouldn't include any breaking changes.