Open sunny9528 opened 5 years ago
Is this constructor the key word?
Yes, constructor
is a reserved word in javascript.
Still there should not be an error!
I connot reproduce this issue: https://jsbin.com/sefefiliqi/edit?html,js,output
When the node ID is'constructor', there will be an error, and lable is no problem
Looks like a bug to me: https://jsbin.com/sefefiliqi/1/edit?html,js,console,output
The documentation for node.id
states:
The id of the node. The id is mandatory for nodes and they have to be unique. This should obviously be set per node, not globally
Here is nothing that states the id
can not be a reserved word. We should at least fix the documentation.
Workaround for now: Don't use reserved words!
Well, thank you. I see. Thank you very much.
When I use vis to draw a network, when one of the nodes is named 'constructor', the network displays an error.I checked the IDs of other nodes to confirm that there was no duplication. I want to ask why.Is this constructor the key word?