Connect custom popup to node

Is there way to conncet my custom popup to bpmn node?
i found something like this but it doesn’t work correctly in full
my wronk variant look like so

  modeler.on('selection.changed', (e: any) => {
            setAnchorEl(document.querySelector(`[data-element-id='${e.newSelection[0].id}']`))
        })

i got the id of the selected item and then found it in my home
everything looks fine at first glance, but when I move (scroll) my canvas view, the popup stays in the same place where it was rendered. I understand this behaviour, the reason is how bpmn scroll works.

How can i fix this ? What is correct way to connect my popup to bpmn node ? ( my popup work with dom node, it will be very nice conect with it)

You could update the popup position whenever the canvas changed:

eventBus.on('canvas.viewbox.changed', () => {
  // go ahead and re-position popup menu
})

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