bpmn-io / bpmn-js

A BPMN 2.0 rendering toolkit and web modeler.
https://bpmn.io/toolkit/bpmn-js/
Other
8.49k stars 1.3k forks source link

Multi-selection in viewer causes black boxes #2135

Open nikku opened 4 months ago

nikku commented 4 months ago

Describe the Bug

As a user I'm embedding the viewer as recommended in the starter project. When I select elements no outline is shown, I can still react to selected events; this I expect.

However when I select more than one element a black box appears that hides the diagram:

capture vSxTJn_optimized

Steps to Reproduce

  1. open starter viewer example
  2. select more than one element using SHIFT + click
  3. see black box appear

Expected Behavior

Environment

philippfromme commented 4 months ago

I think that we need to be clear on what a viewer is. The default viewer in my opinion, should behave like viewing an SVG. No interactivity at all. I never liked the fact that you get selection behavior in the viewer. Now, there are use cases that need an interactive viewer. In these cases, users need to include the required features and stylesheets as well. Alternatively, we could offer something similar to the navigated viewer.

philippfromme commented 4 months ago

There would still remain the problem of interactive viewer and no selection outlines for connections. In the modeler selection is indicated by showing the bendpoints.

image

In an interactive viewer selecting connections should be indicated. We should have a solution for that.

nikku commented 4 months ago

No interactivity means that you cannot properly react to states in i.e. overlays. Hence the viewer would always offer basic interactivity, including hover and selection.

philippfromme commented 4 months ago

Overlays is a feature of an interactive viewer, I'd say.

barmac commented 4 months ago

I'd say there are 4 ways to display diagram:

Otherwise we should rename the Viewer to Renderer, as that's what it is without any interactivity.

nikku commented 4 months ago

Thanks for https://github.com/bpmn-io/bpmn-js/issues/2135#issuecomment-2047268633 @barmac. I subscribe to it. Without interactivity the viewer is simply a renderer.

You can roll your own barebones renderer if you so desire on top of the BaseViewer package.