cytoscape-panzoom
Advanced tools
Comparing version 2.5.1 to 2.5.2
@@ -22,5 +22,5 @@ { | ||
"dependencies": { | ||
"jquery": "^1.4 || ^2.0", | ||
"jquery": "^1.4 || ^2.0 || ^3.0", | ||
"cytoscape": "^2.0.0 || ^3.0.0" | ||
} | ||
} |
@@ -27,6 +27,6 @@ /*! | ||
var register = function( cytoscape, $ ){ | ||
if( !cytoscape ){ return; } // can't register if cytoscape unspecified | ||
if( !cytoscape || !$ ){ return; } // can't register if cytoscape or jquery unspecified | ||
$.fn.cyPanzoom = $.fn.cytoscapePanzoom = function( options ){ | ||
panzoom.apply( this, [ options, $ ] ); | ||
panzoom.apply( this, [ options, cytoscape, $ ] ); | ||
@@ -38,4 +38,3 @@ return this; // chainability | ||
cytoscape('core', 'panzoom', function( options ){ // could use options object, but args are up to you | ||
var cy = this; | ||
panzoom.apply( this, [ options, $ ] ); | ||
panzoom.apply( this, [ options, cytoscape, $ ] ); | ||
@@ -73,3 +72,3 @@ return this; // chainability | ||
var panzoom = function( params, $ ){ | ||
var panzoom = function( params, cytoscape, $ ){ | ||
var cyRef = this; | ||
@@ -578,3 +577,5 @@ var options = $.extend(true, {}, defaults, params); | ||
if( typeof module !== 'undefined' && module.exports ){ // expose as a commonjs module | ||
module.exports = register; | ||
module.exports = function( cytoscape, jquery ){ | ||
register( cytoscape, jquery || require('jquery') ); | ||
} | ||
} else if( typeof define !== 'undefined' && define.amd ){ // expose as an amd/requirejs module | ||
@@ -581,0 +582,0 @@ define('cytoscape-panzoom', function(){ |
{ | ||
"name": "cytoscape-panzoom", | ||
"version": "2.5.1", | ||
"version": "2.5.2", | ||
"description": "Panzoom extension for Cytoscape.js", | ||
@@ -33,5 +33,7 @@ "main": "cytoscape-panzoom.js", | ||
"peerDependencies": { | ||
"jquery": "^1.4 || ^2.0", | ||
"cytoscape": "^2.0.0 || ^3.0.0" | ||
}, | ||
"dependencies": { | ||
"jquery": "^1.4 || ^2.0 || ^3.0" | ||
} | ||
} |
@@ -14,3 +14,3 @@ cytoscape-panzoom | ||
* jQuery ^1.4 || ^2.0 | ||
* jQuery ^1.4 || ^2.0 || ^3.0 | ||
* Cytoscape.js ^2.0.0 || ^3.0.0 | ||
@@ -40,4 +40,4 @@ * Font Awesome 4 (for automatic icons), or you can specify your own class names for icons | ||
```js | ||
require(['cytoscape', 'cytoscape-panzoom'], function( cytoscape, panzoom ){ | ||
panzoom( cytoscape ); // register extension | ||
require(['cytoscape', 'jquery', 'cytoscape-panzoom'], function( cytoscape, $, panzoom ){ | ||
panzoom( cytoscape, $ ); // register extension | ||
}); | ||
@@ -44,0 +44,0 @@ ``` |
592646
2090
+ Addedjquery@^1.4 || ^2.0 || ^3.0
+ Addedjquery@3.7.1(transitive)
- Removedjquery@2.2.4(transitive)