cytoscape / cytoscape.js-navigator

Bird's eye view pan and zoom control for Cytoscape.js.
MIT License
67 stars 42 forks source link

jQuery is not defined error #36

Closed israel-hdez closed 6 years ago

israel-hdez commented 6 years ago

I wanted to use the navigator in a React app. I guess in a React app the module gets defined as a CommonJs module.

When initializing the navigator, if I set a container, I get "jQuery is not defined" error.

I guess the _initPanel function is referencing the global jQuery object rather than using the local $ variable.

maxkfranz commented 6 years ago

It should require('jquery') unless you already are using globals: https://github.com/cytoscape/cytoscape.js-navigator/blob/master/cytoscape-navigator.js#L886

israel-hdez commented 6 years ago

Not sure if this helps, but for me, it fails here: https://github.com/cytoscape/cytoscape.js-navigator/blob/master/cytoscape-navigator.js#L364

maxkfranz commented 6 years ago

@israel-hdez Does 0006766 resolve it for you?

israel-hdez commented 6 years ago

@maxkfranz Yes, it's solved.

maxkfranz commented 6 years ago

Published 1.3.3