You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: Have LineCursor decide where to move itself upon delete
Refactor to have LineCursor decide where it will move when a block
deletion occurs (if it needs to move).
The cursor is moved to one of the following locations (in order
of preference) that is valid:
- The connection to which the deleted block attached.
- The block connected to the next connection of the deleted block.
- The parent block of the deleted block.
- A location on the workspace beneath the deleted block.
BUG: because the deletion has not yet occurred, the "if valid"
check is not accurate, and e.g. the cursor will get moved to
the parent block when deleting the last/only block connected
to an input, instead of getting moved to the input itself
(which would normally be allowed for empty inputs).
Fixes#254.
* fix: Check post-delete node after deletion
Split prepareForDelete into preDelete and postDelete, with the
former making a list of possible places to move the cursor to,
and the latter checking to see if they are still valid locations
after the deletion has occurred.
Introduces a new validNode method to check for validity.
* chore: Format
0 commit comments