vis-network icon indicating copy to clipboard operation
vis-network copied to clipboard

label scaling can't be reset

Open maunstrifes opened this issue 5 years ago • 3 comments

I want to give the user the possibility to choose if labels should be scaled. Unfortunately I was just able to activate it once but then can't seem to be able to reset it again.

I experimented with a simple example in Angular using Typescript, but it should be easily transferable to JS: https://stackblitz.com/edit/vis-network-label-scaling-example?file=src/app/vis/vis.component.ts The checkbox underneath the network changes the options, I'm also logging the values in the console.

I tried the following approaches:

  • Enabling globally when instancing the network: works but can't be disabled again
  • Enabling globally after instancing the network: doesn't work at all
  • Enabling locally on every node after instancing the network: works but can't be disabled again

The behaviour is the same in the first used version 7.0.0 as well as the latest one used in the stackblitz-example.

Thanks for your help in advance!

maunstrifes avatar Aug 27 '20 07:08 maunstrifes

Hi @mheinzl,

I have no idea how Angular works, if this is not specific to Angular, provide a plain JS version, please.

Thanks.

Thomaash avatar Aug 27 '20 19:08 Thomaash

Hi,

I made the same example in jsfiddle here: https://jsfiddle.net/jab7sp6m/ You can see and try out the different approaches in the code which is commented out.

Thank you!

maunstrifes avatar Aug 28 '20 06:08 maunstrifes

The problem still persists, did you by any chance find the time to check out the jsfiddle?

maunstrifes avatar Jul 28 '22 10:07 maunstrifes