bumbeishvili / org-chart

Highly customizable org chart. Integrations available for Angular, React, Vue
https://stackblitz.com/edit/web-platform-o5t1ha
MIT License
927 stars 330 forks source link

How can I solve this? Is it possible? #241

Closed MateoCaicedoW closed 1 year ago

MateoCaicedoW commented 1 year ago

I made a dropdown inside of nodeContent function but, when it is displayed it looks like this. How can I get it overlay to the other nodes?

image
bumbeishvili commented 1 year ago

@MateoCaicedoW

If you can somehow get access to the wrapper dom element, you can invoke d3.select(element).raise() and it should fix that issue

MateoCaicedoW commented 1 year ago

Thanks for answering. Could you give me an example?

bumbeishvili commented 1 year ago

In your place, I'd probably listen to a mouse enter events for a .node-foreign-object-div

Let me know if it works

chart.onNodeUpdate(function()=>{
  d3.select(this).select('.node-foreign-object-div')
    .on('mouseenter.hover',d=>{  // named events won't cause performance burden 
        d3.select(this).raise()
    })
})
MateoCaicedoW commented 1 year ago

Thanks, it works, but the drop-down list should be scrolling but, when I try to scroll it, the zoom doesn't allow it.

bumbeishvili commented 1 year ago

Not exactly sure how to help there. I am guessing you need somehow to catch the scrolling event for dropdown and don't bubble up

MateoCaicedoW commented 1 year ago

how could I make the zoom not apply to the list?