-
-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't seem to change node label color and size at the same time. #113
Labels
question
Further information is requested
Comments
Doesn't _dataChanged reload data and overwrite what you manually set into
the internal nodes? I think you're better of just changing it in your data
set.
…On Tue, Sep 3, 2019, 23:26 Carlos Nazareno ***@***.***> wrote:
So I'm using this code to try to change node size/label color on click:
network.body.nodes[id].options.size = newSize;
network.body.nodes[id].options.font.color = newColor;
Then I follow it with:
network.body.emitter.emit('_dataChanged');
network.redraw();
The problem is that if I call network.body.emitter.emit('_dataChanged'),
the node size no longer changes, but label color changes. If I don't call
it, node size changes, but label color no longer changes.
Is this a bug? What is the proper way to change node size/label color at
the same time?
Googling and searching on stack overflow yield few results and a bunch of
404 links to old Vis JS doc/example links that are now down.
Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#113?email_source=notifications&email_token=ADC5WZIBOQKBVGRZPDV3QYLQH3JANA5CNFSM4ITLAUZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJC73EQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADC5WZJER4ALLQEKFU73MKDQH3JANANCNFSM4ITLAUZQ>
.
|
… On Tue, Sep 3, 2019, 23:30 Tomáš Vyčítal ***@***.***> wrote:
Doesn't _dataChanged reload data and overwrite what you manually set into
the internal nodes? I think you're better of just changing it in your data
set.
On Tue, Sep 3, 2019, 23:26 Carlos Nazareno ***@***.***>
wrote:
> So I'm using this code to try to change node size/label color on click:
>
> network.body.nodes[id].options.size = newSize;
> network.body.nodes[id].options.font.color = newColor;
>
> Then I follow it with:
>
> network.body.emitter.emit('_dataChanged');
> network.redraw();
>
> The problem is that if I call network.body.emitter.emit('_dataChanged'),
> the node size no longer changes, but label color changes. If I don't call
> it, node size changes, but label color no longer changes.
>
> Is this a bug? What is the proper way to change node size/label color at
> the same time?
>
> Googling and searching on stack overflow yield few results and a bunch of
> 404 links to old Vis JS doc/example links that are now down.
>
> Thanks!
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#113?email_source=notifications&email_token=ADC5WZIBOQKBVGRZPDV3QYLQH3JANA5CNFSM4ITLAUZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJC73EQ>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ADC5WZJER4ALLQEKFU73MKDQH3JANANCNFSM4ITLAUZQ>
> .
>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So I'm using this code to try to change node size/label color on click:
network.body.nodes[id].options.size = newSize;
network.body.nodes[id].options.font.color = newColor;
Then I follow it with:
network.body.emitter.emit('_dataChanged');
network.redraw();
The problem is that if I call network.body.emitter.emit('_dataChanged'), the node size no longer changes, but label color changes. If I don't call it, node size changes, but label color no longer changes.
Is this a bug? What is the proper way to change node size/label color at the same time?
Googling and searching on stack overflow yield few results and a bunch of 404 links to old Vis JS doc/example links that are now down.
Thanks!
The text was updated successfully, but these errors were encountered: