-
-
Notifications
You must be signed in to change notification settings - Fork 334
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
DragHandle positioning #15
Comments
@17Amir17 This currently breaks when resizing the window: |
The issue here is that the horizontal anchor is calculated when the window is opened and then is never changed. I can listen for resize events and recalculate the horizontal anchor and this would partially solve the issue. The issue remaining is that the draghandle will render into the new position only after the mouse moves again. To fix this we need to create a transaction each resize event and render the draghandle again ( I think this requires us to move the render function from the plugins props to plugins update) What do you think @YousefED ? |
We need to clean up the position of the draghandle:
Horizontal position
The draghandle now displays right before elements, even when they are indented. This is ugly as it overlaps with the vertical line ("the indentation guide").
Design-wise; I don't think there's an easy option where we can have both indentation guides and a draghandle right next to the block.
So there are two options here:
a) remove indentation guides (notion also doesn't have this, it's more inspired by Roam) and display draghandles right next to the element similar to Notion
b) always show the draghandles on the left side of the document (so at the same horizontal position as root-level elements)
Preferably, indentation lines can be configured by the consumer library, and if enabled we show Draghandles at position B, otherwise at position A
The text was updated successfully, but these errors were encountered: