From 036caf47f96e8dd7f1fd8a5fff388f1688723dbd Mon Sep 17 00:00:00 2001 From: metincansiper Date: Thu, 22 Sep 2016 16:44:17 +0300 Subject: [PATCH] TypeError: viewUtilities is not a function #6 --- .gitignore | 4 +++- README.md | 8 +++++--- cytoscape-view-utilities.js | 18 ++++++++++-------- gulpfile.js | 34 ++++++++++++++++++++++++++++------ package.json | 24 +++++++++++++++++------- 5 files changed, 63 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 34977ee..f755f1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules -.idea \ No newline at end of file +.idea +/nbproject/private/ +/nbproject/* \ No newline at end of file diff --git a/README.md b/README.md index 524c835..eadd207 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,8 @@ Shows hidden eles. ## Dependencies - * Cytoscape.js ^1.7.3 + * Cytoscape.js ^2.7.0 + * jQuery ^1.7.0 || ^2.0.0 || ^3.0.0 * cytoscape-undo-redo.js ^1.0.8 (optional) @@ -109,9 +110,10 @@ Download the library: CommonJS: ```js var cytoscape = require('cytoscape'); -var view-utilities = require('cytoscape-view-utilities'); +var jquery = require('jquery'); +var viewUtilities = require('cytoscape-view-utilities'); -view-utilities( cytoscape ); // register extension +viewUtilities( cytoscape, jquery ); // register extension ``` AMD: diff --git a/cytoscape-view-utilities.js b/cytoscape-view-utilities.js index 116ee95..a77e4d1 100644 --- a/cytoscape-view-utilities.js +++ b/cytoscape-view-utilities.js @@ -1,4 +1,4 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o