ErikGartner / dTree

A library for visualizing data trees with multiple parents, such as family trees. Built on top of D3.
https://treehouse.gartner.io/ErikGartner/58e58be650453b6d49d7
MIT License
521 stars 139 forks source link

Safari rendering issue. #81

Closed saqibomer closed 5 years ago

saqibomer commented 5 years ago

I am using dTree to create a family tree. I am using custom node to create nodes. It is working fine on Chrome but not working on Safari. Nodes are not rendered properly.

screenshot 2018-10-29 at 5 10 44 pm

JSFiddle link.

ErikGartner commented 5 years ago

Hard to say why.

Perhaps if you share a jsfiddle but I suspect that there is something invalid in your HTML and chrome is less strict.

saqibomer commented 5 years ago

Added jsfiddle link

ErikGartner commented 5 years ago

Hi!

I have had a look at your code and it's hard for me to figure exactly what's wrong. My best suggestion is using the library directly (without hacking the dTree source code) with the callbacks. Then successively adding more adding more complex nodes through the callback nodeRenderer.

I've modified the example on jsfiddle to use the callback and this works fine in both chrome and safari.

https://jsfiddle.net/tpde0cer/992/

Good luck with the bug hunt! /Erik