Skip to content

Commit

Permalink
Build 3.14.3
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkfranz committed Jun 10, 2020
1 parent a0a0eef commit f87f23b
Show file tree
Hide file tree
Showing 8 changed files with 251 additions and 217 deletions.
30 changes: 15 additions & 15 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
{
"build/cytoscape.umd.js": {
"bundled": 929677,
"minified": 345303,
"gzipped": 107548
"bundled": 929686,
"minified": 345311,
"gzipped": 107546
},
"build/cytoscape.cjs.js": {
"bundled": 856806,
"minified": 364183,
"gzipped": 109877
"bundled": 856803,
"minified": 364211,
"gzipped": 109887
},
"build/cytoscape.esm.js": {
"bundled": 856633,
"minified": 364040,
"gzipped": 109841,
"bundled": 856630,
"minified": 364068,
"gzipped": 109851,
"treeshaked": {
"rollup": {
"code": 339962,
"code": 339970,
"import_statements": 51
},
"webpack": {
"code": 340872
"code": 340880
}
}
},
"build/cytoscape.esm.min.js": {
"bundled": 344163,
"minified": 344188,
"bundled": 344171,
"minified": 344190,
"gzipped": 107087,
"treeshaked": {
"rollup": {
"code": 343646,
"code": 343648,
"import_statements": 0
},
"webpack": {
"code": 344433
"code": 344435
}
}
}
Expand Down
61 changes: 33 additions & 28 deletions dist/cytoscape.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13958,18 +13958,7 @@ function stepAll(now, cy) {
var _p = ele._private;
var current = _p.animation.current;
var queue = _p.animation.queue;
var ranAnis = false; // cancel all animations on display:none ele

if (!isCore && ele.pstyle('display').value === 'none') {
// put all current and queue animations in this tick's current list
// and empty the lists for the element
current = current.splice(0, current.length).concat(queue.splice(0, queue.length)); // stop all animations

for (var i = 0; i < current.length; i++) {
current[i].stop();
}
} // if nothing currently animating, get something from the queue

var ranAnis = false; // if nothing currently animating, get something from the queue

if (current.length === 0) {
var next = queue.shift();
Expand All @@ -13989,12 +13978,12 @@ function stepAll(now, cy) {
}; // step and remove if done


for (var _i = current.length - 1; _i >= 0; _i--) {
var ani = current[_i];
for (var i = current.length - 1; i >= 0; i--) {
var ani = current[i];
var ani_p = ani._private;

if (ani_p.stopped) {
current.splice(_i, 1);
current.splice(i, 1);
ani_p.hooked = false;
ani_p.playing = false;
ani_p.started = false;
Expand Down Expand Up @@ -14028,7 +14017,7 @@ function stepAll(now, cy) {
}

if (ani.completed()) {
current.splice(_i, 1);
current.splice(i, 1);
ani_p.hooked = false;
ani_p.playing = false;
ani_p.started = false;
Expand Down Expand Up @@ -16268,6 +16257,11 @@ var styfn$6 = {};
},
any: function any(val1, val2) {
return val1 != val2;
},
emptyNonEmpty: function emptyNonEmpty(str1, str2) {
var empty1 = emptyString(str1);
var empty2 = emptyString(str2);
return empty1 && !empty2 || !empty1 && empty2;
}
}; // define visual style properties
//
Expand All @@ -16278,7 +16272,8 @@ var styfn$6 = {};
var mainLabel = [{
name: 'label',
type: t.text,
triggersBounds: diff.any
triggersBounds: diff.any,
triggersZOrder: diff.emptyNonEmpty
}, {
name: 'text-rotation',
type: t.textRotation,
Expand Down Expand Up @@ -22217,7 +22212,9 @@ BRp$3.findTaxiPoints = function (edge, pairInfo) {

var taxiTurn = edge.pstyle('taxi-turn');
var turnIsPercent = taxiTurn.units === '%';
var taxiTurnPfVal = turnIsPercent && taxiTurn.pfValue < 0 ? 1 + taxiTurn.pfValue : taxiTurn.pfValue;
var taxiTurnPfVal = taxiTurn.pfValue;
var turnIsNegative = taxiTurnPfVal < 0; // i.e. from target side

var minD = edge.pstyle('taxi-turn-min-distance').pfValue;
var dw = dIncludesNodeBody ? (srcW + tgtW) / 2 : 0;
var dh = dIncludesNodeBody ? (srcH + tgtH) / 2 : 0;
Expand All @@ -22236,12 +22233,12 @@ BRp$3.findTaxiPoints = function (edge, pairInfo) {
var dy = subDWH(pdy, dh);
var isExplicitDir = false;

if (taxiDir === AUTO) {
if (rawTaxiDir === AUTO) {
taxiDir = Math.abs(dx) > Math.abs(dy) ? HORIZONTAL : VERTICAL;
} else if (taxiDir === UPWARD || taxiDir === DOWNWARD) {
} else if (rawTaxiDir === UPWARD || rawTaxiDir === DOWNWARD) {
taxiDir = VERTICAL;
isExplicitDir = true;
} else if (taxiDir === LEFTWARD || taxiDir === RIGHTWARD) {
} else if (rawTaxiDir === LEFTWARD || rawTaxiDir === RIGHTWARD) {
taxiDir = HORIZONTAL;
isExplicitDir = true;
}
Expand All @@ -22252,21 +22249,29 @@ BRp$3.findTaxiPoints = function (edge, pairInfo) {
var sgnL = signum(pl);
var forcedDir = false;

if (!(isExplicitDir && turnIsPercent) // forcing in this case would cause weird growing in the opposite direction
if (!(isExplicitDir && (turnIsPercent || turnIsNegative)) // forcing in this case would cause weird growing in the opposite direction
&& (rawTaxiDir === DOWNWARD && pl < 0 || rawTaxiDir === UPWARD && pl > 0 || rawTaxiDir === LEFTWARD && pl > 0 || rawTaxiDir === RIGHTWARD && pl < 0)) {
sgnL *= -1;
l = sgnL * Math.abs(l);
forcedDir = true;
}

var d = turnIsPercent ? taxiTurnPfVal * l : taxiTurnPfVal * sgnL;
var d;

if (turnIsPercent) {
var p = taxiTurnPfVal < 0 ? 1 + taxiTurnPfVal : taxiTurnPfVal;
d = p * l;
} else {
var k = taxiTurnPfVal < 0 ? l : 0;
d = k + taxiTurnPfVal * sgnL;
}

var getIsTooClose = function getIsTooClose(d) {
return Math.abs(d) < minD || Math.abs(d) >= Math.abs(l);
};

var isTooCloseSrc = getIsTooClose(d);
var isTooCloseTgt = getIsTooClose(l - Math.abs(d));
var isTooCloseTgt = getIsTooClose(Math.abs(l) - Math.abs(d));
var isTooClose = isTooCloseSrc || isTooCloseTgt;

if (isTooClose && !forcedDir) {
Expand Down Expand Up @@ -22320,14 +22325,14 @@ BRp$3.findTaxiPoints = function (edge, pairInfo) {
} else {
// ideal routing
if (isVert) {
var _y4 = (d < 0 ? posPts.y2 : posPts.y1) + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0);
var _y4 = posPts.y1 + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0);

var _x4 = posPts.x1,
_x5 = posPts.x2;
rs.segpts = [_x4, _y4, _x5, _y4];
} else {
// horizontal
var _x6 = (d < 0 ? posPts.x2 : posPts.x1) + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0);
var _x6 = posPts.x1 + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0);

var _y5 = posPts.y1,
_y6 = posPts.y2;
Expand Down Expand Up @@ -23750,7 +23755,7 @@ BRp$7.getNodeShape = function (node) {
}

if (node.isParent()) {
if (shape === 'rectangle' || shape === 'roundrectangle' || shape === 'cutrectangle' || shape === 'barrel') {
if (shape === 'rectangle' || shape === 'roundrectangle' || shape === 'round-rectangle' || shape === 'cutrectangle' || shape === 'cut-rectangle' || shape === 'barrel') {
return shape;
} else {
return 'rectangle';
Expand Down Expand Up @@ -31491,7 +31496,7 @@ sheetfn.appendToStyle = function (style) {
return style;
};

var version = "3.14.2";
var version = "3.14.3";

var cytoscape = function cytoscape(options) {
// if no options specified, use default
Expand Down
61 changes: 33 additions & 28 deletions dist/cytoscape.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -13954,18 +13954,7 @@ function stepAll(now, cy) {
var _p = ele._private;
var current = _p.animation.current;
var queue = _p.animation.queue;
var ranAnis = false; // cancel all animations on display:none ele

if (!isCore && ele.pstyle('display').value === 'none') {
// put all current and queue animations in this tick's current list
// and empty the lists for the element
current = current.splice(0, current.length).concat(queue.splice(0, queue.length)); // stop all animations

for (var i = 0; i < current.length; i++) {
current[i].stop();
}
} // if nothing currently animating, get something from the queue

var ranAnis = false; // if nothing currently animating, get something from the queue

if (current.length === 0) {
var next = queue.shift();
Expand All @@ -13985,12 +13974,12 @@ function stepAll(now, cy) {
}; // step and remove if done


for (var _i = current.length - 1; _i >= 0; _i--) {
var ani = current[_i];
for (var i = current.length - 1; i >= 0; i--) {
var ani = current[i];
var ani_p = ani._private;

if (ani_p.stopped) {
current.splice(_i, 1);
current.splice(i, 1);
ani_p.hooked = false;
ani_p.playing = false;
ani_p.started = false;
Expand Down Expand Up @@ -14024,7 +14013,7 @@ function stepAll(now, cy) {
}

if (ani.completed()) {
current.splice(_i, 1);
current.splice(i, 1);
ani_p.hooked = false;
ani_p.playing = false;
ani_p.started = false;
Expand Down Expand Up @@ -16264,6 +16253,11 @@ var styfn$6 = {};
},
any: function any(val1, val2) {
return val1 != val2;
},
emptyNonEmpty: function emptyNonEmpty(str1, str2) {
var empty1 = emptyString(str1);
var empty2 = emptyString(str2);
return empty1 && !empty2 || !empty1 && empty2;
}
}; // define visual style properties
//
Expand All @@ -16274,7 +16268,8 @@ var styfn$6 = {};
var mainLabel = [{
name: 'label',
type: t.text,
triggersBounds: diff.any
triggersBounds: diff.any,
triggersZOrder: diff.emptyNonEmpty
}, {
name: 'text-rotation',
type: t.textRotation,
Expand Down Expand Up @@ -22213,7 +22208,9 @@ BRp$3.findTaxiPoints = function (edge, pairInfo) {

var taxiTurn = edge.pstyle('taxi-turn');
var turnIsPercent = taxiTurn.units === '%';
var taxiTurnPfVal = turnIsPercent && taxiTurn.pfValue < 0 ? 1 + taxiTurn.pfValue : taxiTurn.pfValue;
var taxiTurnPfVal = taxiTurn.pfValue;
var turnIsNegative = taxiTurnPfVal < 0; // i.e. from target side

var minD = edge.pstyle('taxi-turn-min-distance').pfValue;
var dw = dIncludesNodeBody ? (srcW + tgtW) / 2 : 0;
var dh = dIncludesNodeBody ? (srcH + tgtH) / 2 : 0;
Expand All @@ -22232,12 +22229,12 @@ BRp$3.findTaxiPoints = function (edge, pairInfo) {
var dy = subDWH(pdy, dh);
var isExplicitDir = false;

if (taxiDir === AUTO) {
if (rawTaxiDir === AUTO) {
taxiDir = Math.abs(dx) > Math.abs(dy) ? HORIZONTAL : VERTICAL;
} else if (taxiDir === UPWARD || taxiDir === DOWNWARD) {
} else if (rawTaxiDir === UPWARD || rawTaxiDir === DOWNWARD) {
taxiDir = VERTICAL;
isExplicitDir = true;
} else if (taxiDir === LEFTWARD || taxiDir === RIGHTWARD) {
} else if (rawTaxiDir === LEFTWARD || rawTaxiDir === RIGHTWARD) {
taxiDir = HORIZONTAL;
isExplicitDir = true;
}
Expand All @@ -22248,21 +22245,29 @@ BRp$3.findTaxiPoints = function (edge, pairInfo) {
var sgnL = signum(pl);
var forcedDir = false;

if (!(isExplicitDir && turnIsPercent) // forcing in this case would cause weird growing in the opposite direction
if (!(isExplicitDir && (turnIsPercent || turnIsNegative)) // forcing in this case would cause weird growing in the opposite direction
&& (rawTaxiDir === DOWNWARD && pl < 0 || rawTaxiDir === UPWARD && pl > 0 || rawTaxiDir === LEFTWARD && pl > 0 || rawTaxiDir === RIGHTWARD && pl < 0)) {
sgnL *= -1;
l = sgnL * Math.abs(l);
forcedDir = true;
}

var d = turnIsPercent ? taxiTurnPfVal * l : taxiTurnPfVal * sgnL;
var d;

if (turnIsPercent) {
var p = taxiTurnPfVal < 0 ? 1 + taxiTurnPfVal : taxiTurnPfVal;
d = p * l;
} else {
var k = taxiTurnPfVal < 0 ? l : 0;
d = k + taxiTurnPfVal * sgnL;
}

var getIsTooClose = function getIsTooClose(d) {
return Math.abs(d) < minD || Math.abs(d) >= Math.abs(l);
};

var isTooCloseSrc = getIsTooClose(d);
var isTooCloseTgt = getIsTooClose(l - Math.abs(d));
var isTooCloseTgt = getIsTooClose(Math.abs(l) - Math.abs(d));
var isTooClose = isTooCloseSrc || isTooCloseTgt;

if (isTooClose && !forcedDir) {
Expand Down Expand Up @@ -22316,14 +22321,14 @@ BRp$3.findTaxiPoints = function (edge, pairInfo) {
} else {
// ideal routing
if (isVert) {
var _y4 = (d < 0 ? posPts.y2 : posPts.y1) + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0);
var _y4 = posPts.y1 + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0);

var _x4 = posPts.x1,
_x5 = posPts.x2;
rs.segpts = [_x4, _y4, _x5, _y4];
} else {
// horizontal
var _x6 = (d < 0 ? posPts.x2 : posPts.x1) + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0);
var _x6 = posPts.x1 + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0);

var _y5 = posPts.y1,
_y6 = posPts.y2;
Expand Down Expand Up @@ -23746,7 +23751,7 @@ BRp$7.getNodeShape = function (node) {
}

if (node.isParent()) {
if (shape === 'rectangle' || shape === 'roundrectangle' || shape === 'cutrectangle' || shape === 'barrel') {
if (shape === 'rectangle' || shape === 'roundrectangle' || shape === 'round-rectangle' || shape === 'cutrectangle' || shape === 'cut-rectangle' || shape === 'barrel') {
return shape;
} else {
return 'rectangle';
Expand Down Expand Up @@ -31487,7 +31492,7 @@ sheetfn.appendToStyle = function (style) {
return style;
};

var version = "3.14.2";
var version = "3.14.3";

var cytoscape = function cytoscape(options) {
// if no options specified, use default
Expand Down
2 changes: 1 addition & 1 deletion dist/cytoscape.esm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cytoscape.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit f87f23b

Please sign in to comment.