fungus icon indicating copy to clipboard operation
fungus copied to clipboard

Fix visual bug when dragging blocks with FungusEditorPreferences.useGridSnap enabled

Open ongjinwen opened this issue 3 years ago • 1 comments

Description

Minor refactoring to fix visual bug when FungusEditorPreferences.useGridSnap is enabled.

What is the current behavior?

When FungusEditorPreferences.useGridSnap is enabled, labels and connections do not follow the snapped position of block._NodeRect. Apparently, this change also fixes the snap width when scrolling.

What is the new behavior?

  • Store and use temp block rect values
  • Manage in OnMouse methods instead of Draw methods

ongjinwen avatar May 02 '21 20:05 ongjinwen

Thanks for the PR.

Clarifying, the minor, purely visual bug mentioned is the connecting lines not matching perfectly the snap point during while user is dragging.

Having looked at the severity of the issue and the changes to the code, I'm going to remove this from the current bugfix. I'll return to it soon. At that time I'll most likely merge it in and then make changes to the solution here to remove the need for the dictonary, as it makes the source of truth for block positions unclear and makes future work more error prone.

stevehalliwell avatar Jun 12 '21 03:06 stevehalliwell