Mini-map shows inner objects when outer one is collapsed

Hi,
Are you facing some problems with mini-map visualization with collapsed objects that contain other objects? It looks like a mini-map that shows everything without hiding inner objects.
Only inner objects on the main diagram are hidden but still visible on the map.
I’m using diagram-js (not bpmn-js).
image

Regards,
Michal

Hi Michal,

I haven’t noticed the issue in bpmn-js. Perhaps this is related to the planes feature, cf. diagram-js-minimap/Minimap.js at 2242808b6d962617d1cc213cf470b142bd9c70ae · bpmn-io/diagram-js-minimap · GitHub

For further assistance, please share a CodeSandbox that reproduces your issue in a way that we can inspect it.

Hi Maciej,
Thanks for the feedback.
I was able to reproduce the issue on codesandbox.
My origin project has more customized stuff (like renderer, which I was thinking might be guilty here), but even without these custom modules, I was able to reproduce it here.
Apart from these custom modules etc. this is how I manage to collapse objects: commandStack.execute(“shape.toggleCollapse”, { shape, hints: {} }).
Maybe this is the problem? I don’t know, but it was the only possible way I could find.
Regards

Hi @barmac,
Did you see my code-sandbox? I was able to reproduce the issue on ‘bare’ diagram-js.
What do you think about that?
Regards

@catcher Sorry for late response; this slipped our attention.

As you use shape.toggleCollapse which indicates the collapsed state via shape.collapsed=true|false the integration should just work. If it does not, then we have a bug.

Unfortunately I cannot open the sandbox right now due to some 500 error. Will try again tomorrow.

1 Like

Sorry, I totally missed your post. I will have a look at the codesandbox and respond here.

I can reproduce the problem in CodeSandbox. It looks like the minimap ignores the hidden property on elements.

I created an issue for this: Children of collapsed shape are still displayed on minimap · Issue #56 · bpmn-io/diagram-js-minimap · GitHub
We are happy to accept community PR with a fix.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.