abcbaby / JsSamplerApp

App contains sample tips from following frameworks, Spring, Spring Security, Jasypt, JSF 2, Primefaces, jQuery, underscore.js, bootstrap, backbone.js, marionette.js, phantom.js, vis.js, etc.
13 stars 4 forks source link

How to add the draw box node selector to ReactJS app? #2

Closed chancesmith closed 6 years ago

chancesmith commented 6 years ago

In your example here you have a draw box node selector: https://github.com/abcbaby/JsSamplerApp/blob/master/src/main/webapp/network/draw.htm

I'm wanting to do the same thing but in a ReactJS app. Here is the question I've posted in StackOverflow: https://stackoverflow.com/questions/51862812/add-multiple-node-box-selector-on-the-canvas-of-visjs-network-graph-in-reactjs/51882584#51882584

Any suggestions would be awesome.

abcbaby commented 6 years ago

The best I can think of is:

1) Create a NEW ReactJS app 2) Import vis.js into it 3) Create a new component and add the draw box functions (from my example); call it VisHighlight 4) In the your ReactJS (that you want to utilize), import the new ReactJS app in and call that component, VisHighlight.

Hope this helps!

chancesmith commented 6 years ago

Thank you for the confidence and direction. We gave it another shot....

We got it figured out and posted an answer: https://stackoverflow.com/questions/51862812/add-multiple-node-box-selector-on-the-canvas-of-visjs-network-graph-in-reactjs

We're still lost on how to put it in another file. 🤔