Drawflow icon indicating copy to clipboard operation
Drawflow copied to clipboard

Minimap

Open devmondo opened this issue 4 years ago • 7 comments

Hi,

could we have something like this https://github.com/bpmn-io/diagram-js-minimap

thanks!

devmondo avatar Dec 24 '20 14:12 devmondo

Hi @devmondo

It could be done by listening to the events.

Or look at integrating external plugins into drawflow.

jerosoler avatar Dec 28 '20 08:12 jerosoler

@jerosoler thanks for the reply, I am not sure I understood, but I will take a second look at that.

devmondo avatar Dec 28 '20 12:12 devmondo

Hi!!

I have created a demo with a minimap example.

Here the repo: https://github.com/jerosoler/drawflow-minimap-example Demo: https://jerosoler.github.io/drawflow-minimap-example/

Better late than never!

Jero

jerosoler avatar Jul 01 '21 21:07 jerosoler

just a note: i think that the mouse click and move in the map should move the rectangle to cover the mini representation of the flow. it is confusing as of now :)

many thanks again!

devmondo avatar Jul 02 '21 19:07 devmondo

Uhmmm...

I'll take a look!

The problem is that drawflow has an infinite canvas and not defined by a size. And in this case we indicate a zoom to the minimap.

For example: https://www.piskelapp.com/p/agxzfnBpc2tlbC1hcHByEwsSBlBpc2tlbBiAgICAyJ2kCQw/edit This canvas is a defined by size of pixels.

I think you could do something like detect the limit of the nodes and with automatic zoom. And always show all nodes in minimap. Even if its position is at -5000px and another at + 5000px.

It is also just an example. I will work on it.

jerosoler avatar Jul 03 '21 09:07 jerosoler

@jerosoler many thanks for your hard work and continuous support for any question!

the example piskelapp.com/p/agxzfnBpc2tlbC1hcHByEwsSBlBpc2tlbBiAgICAyJ2kCQw/edit you provided is perfect!

devmondo avatar Jul 04 '21 10:07 devmondo

@jerosoler Hi, This example is inaccessible, can you republish it. thank you https://www.piskelapp.com/p/agxzfnBpc2tlbC1hcHByEwsSBlBpc2tlbBiAgICAyJ2kCQw/edit

learnerYoung avatar Jan 17 '22 08:01 learnerYoung