Drawflow icon indicating copy to clipboard operation
Drawflow copied to clipboard

Minimap simple suggestion / performance idea - how to

Open converseKarl opened this issue 1 year ago • 1 comments

The minimap can get slow when you have a busy UI tab.

What would your suggestion be to still keep the functionality to drag the mini map around but replace the minimized drawflow map to just a simple square block in the map that can be dragged around. This is how I've seen google do it in their applications. Can we modify the mini map script to just be a simple draggable block and not render objects, or connections into the map. The simple block in the map will keep everything very fast then.

converseKarl avatar May 19 '23 03:05 converseKarl

Hello,

The minimap is an example of the possibilities.

You could modify the file: https://github.com/jerosoler/drawflow-minimap-example/blob/main/minimap-drawflow.js

The nodeCreated event function to create a div with a width and height based on the created node. And don't pass the html of the node.

That could solve your problem.

jerosoler avatar May 23 '23 07:05 jerosoler