alexcode / vue2vis

A Vuejs 2 adapter for Visjs
MIT License
217 stars 59 forks source link

Multiple instance #14

Closed toreba closed 6 years ago

toreba commented 6 years ago

Hi

I'm trying to add multiple instance of network on the same page. This almost works, but calling methods via $refs.networkA.... gets mixed up.

As far as I can see, the reason is the module variable "network" inside Network.vue. It will point to the last instance created.

alexcode commented 6 years ago

@Menighin, any idea on this ?

Menighin commented 6 years ago

Hi @alexcode and @toreba,

I've been really busy last few weeks. This is on my "to-do" list. Will try to have a look this week.

ohjeohje commented 6 years ago

Same problem with timeline.

Menighin commented 6 years ago

@alexcode I think if we change it back as a ""hidden property"" as it was here it may work. Maybe is the same solution for timeline. Will do some testing today. Do you remember having any downsides with this approach?

alexcode commented 6 years ago

I guess this is fixed by the PR.

Menighin commented 6 years ago

We still need to fix for the other components though. Will do it today (Y)

vakrolme commented 3 years ago

I think the problem might be still present with at least the 'format' property/function as demonstrated here: https://jsfiddle.net/mb8ypnvz/

I have two timelines and I want them to have different label formatting. When I set options.format on timeline_2, it affects timeline_1 as well.

Any way to fix it?