Skip to content

Commit

Permalink
preparing to publish 2.7.27
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkfranz committed Feb 16, 2018
1 parent cc523d8 commit 1d25ee8
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 48 deletions.
71 changes: 38 additions & 33 deletions dist/cytoscape.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/*!

Cytoscape.js 2.7.26 (MIT licensed)
Cytoscape.js 2.7.27 (MIT licensed)

Copyright (c) The Cytoscape Consortium

Expand Down Expand Up @@ -19216,7 +19216,7 @@ ETCp.getElement = function( ele, bb, pxRatio, lvl, reason ){
downscale();

} else {
self.queueElement( ele, bb, higherCache.level - 1 );
self.queueElement( ele, higherCache.level - 1 );

return higherCache;
}
Expand All @@ -19234,7 +19234,7 @@ ETCp.getElement = function( ele, bb, pxRatio, lvl, reason ){
if( scalableFrom(lowerCache) ){
// then use the lower quality cache for now and queue the better one for later

self.queueElement( ele, bb, lvl );
self.queueElement( ele, lvl );

return lowerCache;
}
Expand Down Expand Up @@ -19286,6 +19286,9 @@ ETCp.invalidateElement = function( ele ){
caches[ lvl ] = null;
util.removeFromArray( txr.eleCaches, cache );

// remove from queue since the old req was for the old state
self.removeFromQueue( ele );

// might have to remove the entire texture if it's not efficiently using its space
self.checkTextureUtility( txr );
}
Expand Down Expand Up @@ -19401,7 +19404,7 @@ ETCp.recycleTexture = function( txrH, minW ){
}
};

ETCp.queueElement = function( ele, bb, lvl ){
ETCp.queueElement = function( ele, lvl ){
var self = this;
var q = self.getElementQueue();
var id2q = self.getElementIdToQueue();
Expand All @@ -19416,19 +19419,10 @@ ETCp.queueElement = function( ele, bb, lvl ){
} else {
var req = {
ele: ele,
bb: bb,
position: math.copyPosition( ele.position() ),
level: lvl,
reqs: 1
};

if( ele.isEdge() ){
req.positions = {
source: math.copyPosition( ele.source().position() ),
target: math.copyPosition( ele.target().position() )
};
}

q.push( req );

id2q[ id ] = req;
Expand All @@ -19444,29 +19438,21 @@ ETCp.dequeue = function( pxRatio /*, extent*/ ){
for( var i = 0; i < maxDeqSize; i++ ){
if( q.size() > 0 ){
var req = q.pop();
var ele = req.ele;
var caches = ele._private.rscratch.imgCaches;

id2q[ req.ele.id() ] = null;
// dequeueing isn't necessary when an existing cache exists
if( caches[ req.level ] != null ){
continue;
}

dequeued.push( req );
id2q[ ele.id() ] = null;

var ele = req.ele;
var bb;
dequeued.push( req );

if(
( ele.isEdge()
&& (
!math.arePositionsSame( ele.source().position(), req.positions.source )
|| !math.arePositionsSame( ele.target().position(), req.positions.target )
)
)
|| ( !math.arePositionsSame( ele.position(), req.position ) )
){
bb = ele.boundingBox();
} else {
bb = req.bb;
}
var bb = ele.boundingBox();

self.getElement( req.ele, bb, pxRatio, req.level, getTxrReasons.dequeue );
self.getElement( ele, bb, pxRatio, req.level, getTxrReasons.dequeue );
} else {
break;
}
Expand All @@ -19475,6 +19461,23 @@ ETCp.dequeue = function( pxRatio /*, extent*/ ){
return dequeued;
};

ETCp.removeFromQueue = function( ele ){
var self = this;
var q = self.getElementQueue();
var id2q = self.getElementIdToQueue();
var req = id2q[ ele.id() ];

if( req != null ){
// bring to front of queue
req.reqs = util.MAX_INT;
q.updateItem( req );

q.pop(); // remove from queue

id2q[ ele.id() ] = null; // remove from lookup map
}
};

ETCp.onDequeue = function( fn ){ this.onDequeues.push( fn ); };
ETCp.offDequeue = function( fn ){ util.removeFromArray( this.onDequeues, fn ); };

Expand All @@ -19496,7 +19499,7 @@ ETCp.setupDequeueing = defs.setupDequeueing({
},
shouldRedraw: function( self, deqd, pxRatio, extent ){
for( var i = 0; i < deqd.length; i++ ){
var bb = deqd[i].bb;
var bb = deqd[i].ele.boundingBox();

if( math.boundingBoxesIntersect( bb, extent ) ){
return true;
Expand Down Expand Up @@ -26892,6 +26895,8 @@ var math = _dereq_( '../math' );

var util = {

MAX_INT: Number.MAX_SAFE_INTEGER || 9007199254740991,

trueify: function(){ return true; },

falsify: function(){ return false; },
Expand Down Expand Up @@ -27428,7 +27433,7 @@ util.debounce = function( func, wait, options ){ // ported lodash debounce funct
module.exports = util;

},{"../is":83,"../window":107}],106:[function(_dereq_,module,exports){
module.exports = "2.7.26";
module.exports = "2.7.27";

},{}],107:[function(_dereq_,module,exports){
module.exports = ( typeof window === 'undefined' ? null : window ); // eslint-disable-line no-undef
Expand Down
24 changes: 12 additions & 12 deletions dist/cytoscape.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/thread-node-fork.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/*!
Cytoscape.js 2.7.26 (MIT licensed)
Cytoscape.js 2.7.27 (MIT licensed)
Copyright (c) The Cytoscape Consortium
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cytoscape",
"version": "2.7.26",
"version": "2.7.27",
"license": "MIT",
"description": "Graph theory (a.k.a. network) library for analysis and visualisation",
"homepage": "http://js.cytoscape.org",
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = "2.7.26";
module.exports = "2.7.27";

0 comments on commit 1d25ee8

Please sign in to comment.