Closed shean42 closed 6 years ago
@shean42 should be fixed by dd880603b4e2bad8ad2eba8b27e596193da1dbc8
You need to provide jquery as an argument during registration:
var cytoscape = require('cytoscape');
var jquery = require('jquery');
var gridGuide = require('cytoscape-grid-guide');
gridGuide( cytoscape, jquery );
Please verify and close, thanks.
How do you do it with cy.gridGuide(options), i.e. according to API description and without using require? In this setting I now get 'TypeError: cy.gridGuide is not a function'.
@shean42 in order to use it first you need to register the extension.
Can you provide a JSFiddle which demonstrates your problem?
But how is an extension registered without 'require' being available in the environment? In your API description it states "Plain HTML/JS has the extension registered for you automatically", is this still accurate?
A JSFiddle won't be easy since I'm working in a much bigger project :-/ However, since it works with my above suggestion, is there a reason to not do it that way?
Initialization of the plugin does not work in my setting due to the above error. In order to make it work I had to adjust the plugin as given below, maybe someone finds this helpful.
},{"functional-red-black-tree":1}],7:[function(require,module,exports){ ;(function($){ 'use strict'; // registers the extension on a cytoscape lib ref [ ... ] })(jQuery);