Skip to content

Commit

Permalink
Preparing to publish 3.2.21
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkfranz committed Nov 28, 2018
1 parent 30db81b commit 2addaa0
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 24 deletions.
49 changes: 41 additions & 8 deletions dist/cytoscape.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -14924,16 +14924,49 @@ styfn.getStylePropertyValue = function (ele, propName, isRenderedVal) {

var type = prop.type;
var styleProp = ele.pstyle(prop.name);
var zoom = ele.cy().zoom();

if (styleProp) {
var units = styleProp.units ? type.implicitUnits || 'px' : null;
var val = units ? [].concat(styleProp.pfValue).map(function (pfValue) {
return pfValue * (isRenderedVal ? zoom : 1) + units;
}).join(' ') : styleProp.strValue;
var value = styleProp.value,
units = styleProp.units,
strValue = styleProp.strValue;

return val;

if (isRenderedVal && type.number && value != null && is.number(value)) {
var zoom = ele.cy().zoom();
var getRenderedValue = function getRenderedValue(val) {
return val * zoom;
};
var getValueStringWithUnits = function getValueStringWithUnits(val, units) {
return getRenderedValue(val) + units;
};
var isArrayValue = is.array(value);
var haveUnits = isArrayValue ? units.every(function (u) {
return u != null;
}) : units != null;

if (haveUnits) {
if (isArrayValue) {
return value.map(function (v, i) {
return getValueStringWithUnits(v, units[i]);
}).join(' ');
} else {
return getValueStringWithUnits(value, units);
}
} else {
if (isArrayValue) {
return value.map(function (v) {
return is.string(v) ? v : '' + getRenderedValue(v);
}).join(' ');
} else {
return '' + getRenderedValue(value);
}
}
} else if (strValue != null) {
return strValue;
}
}

return null;
}
};

Expand Down Expand Up @@ -18734,7 +18767,7 @@ CoseLayout.prototype.run = function () {
do {
var f = 0;

while (f < options.refresh && i < options.numIter) {
while ((f < options.refresh || options.refresh === 0) && i < options.numIter) {
var loopRet = mainLoop(i);
if (!loopRet) {
break;
Expand Down Expand Up @@ -29172,7 +29205,7 @@ module.exports = Stylesheet;
"use strict";


module.exports = "3.2.20";
module.exports = "3.2.21";

/***/ })
/******/ ]);
Expand Down
49 changes: 41 additions & 8 deletions dist/cytoscape.js
Original file line number Diff line number Diff line change
Expand Up @@ -15686,16 +15686,49 @@ styfn.getStylePropertyValue = function (ele, propName, isRenderedVal) {

var type = prop.type;
var styleProp = ele.pstyle(prop.name);
var zoom = ele.cy().zoom();

if (styleProp) {
var units = styleProp.units ? type.implicitUnits || 'px' : null;
var val = units ? [].concat(styleProp.pfValue).map(function (pfValue) {
return pfValue * (isRenderedVal ? zoom : 1) + units;
}).join(' ') : styleProp.strValue;
var value = styleProp.value,
units = styleProp.units,
strValue = styleProp.strValue;

return val;

if (isRenderedVal && type.number && value != null && is.number(value)) {
var zoom = ele.cy().zoom();
var getRenderedValue = function getRenderedValue(val) {
return val * zoom;
};
var getValueStringWithUnits = function getValueStringWithUnits(val, units) {
return getRenderedValue(val) + units;
};
var isArrayValue = is.array(value);
var haveUnits = isArrayValue ? units.every(function (u) {
return u != null;
}) : units != null;

if (haveUnits) {
if (isArrayValue) {
return value.map(function (v, i) {
return getValueStringWithUnits(v, units[i]);
}).join(' ');
} else {
return getValueStringWithUnits(value, units);
}
} else {
if (isArrayValue) {
return value.map(function (v) {
return is.string(v) ? v : '' + getRenderedValue(v);
}).join(' ');
} else {
return '' + getRenderedValue(value);
}
}
} else if (strValue != null) {
return strValue;
}
}

return null;
}
};

Expand Down Expand Up @@ -19496,7 +19529,7 @@ CoseLayout.prototype.run = function () {
do {
var f = 0;

while (f < options.refresh && i < options.numIter) {
while ((f < options.refresh || options.refresh === 0) && i < options.numIter) {
var loopRet = mainLoop(i);
if (!loopRet) {
break;
Expand Down Expand Up @@ -29934,7 +29967,7 @@ module.exports = Stylesheet;
"use strict";


module.exports = "3.2.20";
module.exports = "3.2.21";

/***/ })
/******/ ]);
Expand Down
2 changes: 1 addition & 1 deletion dist/cytoscape.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion documentation/docmaker.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.2.20",
"version": "3.2.21",

"fnArgLinks": {
"selector": "#selectors",
Expand Down
6 changes: 3 additions & 3 deletions documentation/index.html

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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": "3.2.20",
"version": "3.2.21",
"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 = "3.2.20";
module.exports = "3.2.21";

0 comments on commit 2addaa0

Please sign in to comment.