xeokit-sdk icon indicating copy to clipboard operation
xeokit-sdk copied to clipboard

[FEATURE SUGGESTION] Custom TreeViewNodes

Open SoftwareMechanic opened this issue 2 years ago • 4 comments

Hello! I think wuld be nice to be able to add manually nodes to the treeview, and eventually link these nodes to objects through IDs.

The reason why I suggest this implementation is because I would like to manage the model also by a custom defined WBS.

I think would be nice to add a method to the TreeViewPlugin treeview.addNode(nodeName, objectId, parent). where a null parent meanse it is a rootNode.

what do you think about this?

SoftwareMechanic avatar Dec 14 '23 16:12 SoftwareMechanic

Hi, yes I think this would be a good idea. I don't have the time to work on this myself at the moment, but we would welcome this feature if you're able to to contribute it. If so, we would also need an example page that tests and demonstrates it. Cheers

xeolabs avatar Dec 14 '23 17:12 xeolabs

yes, I would be happy to contribute! 😃 I just forked the repository and giving it a look, just a question before I start with this contribution, how can I test in local the examples? they works for the BIM-viewer, but single examples of the SDK are not. if I try to run a local server on examples I get mimetypes error, do you have a .types file, or do you know an alternative way to run examples in local? so I can test my own modifications. sorry but this would be my first contirbution to a js project, bear with me.

SoftwareMechanic avatar Dec 15 '23 09:12 SoftwareMechanic

Great! Hmm I just run http-server from the root directory on Ubunutu and then I can load ./examples/ in Chrome. There are some warnings, but nothing critical, and examples run OK.

xeolabs avatar Dec 15 '23 10:12 xeolabs

oh! I was trying run that command from a non-root folder, it works also on windows by doing as you said! Thank you!

SoftwareMechanic avatar Dec 15 '23 11:12 SoftwareMechanic