Skip to content

Commit

Permalink
Do not use global variable in cueUtils. (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Kozlov authored and mrsfy committed Jul 25, 2016
1 parent 6b37b09 commit 7646674
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions cytoscape-expand-collapse.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/cueUtilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module.exports = function (params) {
init: function () {
var self = this;
var opts = params;
var $container = $(this);
var cy;
var $container = this;
var cy = this.cytoscape('get');
var $canvas = $('<canvas></canvas>');

$container.append($canvas);
Expand Down Expand Up @@ -292,6 +292,7 @@ module.exports = function (params) {
$container.data('cyexpandcollapse', data);
},
unbind: function () {
var cy = this.cytoscape('get');
cy.off('mouseover', 'node', eMouseOver)
.off('mouseout tapdragout', 'node', eMouseOut)
.off('position', 'node', ePosition)
Expand All @@ -313,4 +314,4 @@ module.exports = function (params) {
}

return $(this);
};
};

0 comments on commit 7646674

Please sign in to comment.