ofrohn / d3-celestial

A star map with d3.js
BSD 3-Clause "New" or "Revised" License
631 stars 179 forks source link

Unable to add multiple celestial maps #131

Open aniket-kale opened 2 years ago

aniket-kale commented 2 years ago

Hi, Celestial maps are new for me. I am using this in Vue.

I am trying to add multiple celestial maps on the same page but it's not working. If I comment out any one of them then another one is working but both are not working at the same time. In my application, I have to give the ability to the user to view multiple maps(max 3).

What I saw in the Element tab is that the container tag is not generating after the canvas tag for the second map. (Ref 1st screenshot). container is generated for 1st map still both maps are not working.

Screenshot when both maps are uncommented image

Screenshot when the first map is commented image

Screenshot when the second map is commented image

Please help, Thanks.

aniket-kale commented 2 years ago

Hi @ofrohn, Any thoughts on this? Thanks.

qubiack commented 1 year ago

You can just use an undocumented option container in your config file:

 return {
            adaptable: false,
            container: `CustomId`, // here you can define a custom container name
            'projection': 'airy',
johnvanhulsen commented 1 year ago

Got the same issue. The container option isn't the fix unfortunately. When the second one is implemented; they both gone away.

If someone has a fix, please let me know :)

hugolgst commented 1 month ago

any updates?