Skip to content

Commit

Permalink
Preparing to publish 3.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkfranz committed Mar 15, 2018
1 parent 15bc557 commit 573611a
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 15 deletions.
21 changes: 18 additions & 3 deletions dist/cytoscape.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2524,7 +2524,7 @@ elesfn.remove = function (notifyRenderer) {

function add(ele) {
var alreadyAdded = elesToRemoveIds[ele.id()];
if (alreadyAdded) {
if (ele.removed() || alreadyAdded) {
return;
} else {
elesToRemoveIds[ele.id()] = true;
Expand Down Expand Up @@ -24809,9 +24809,24 @@ BRp.generateBarrel = function () {
},

intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) {
// use two fixed t values for the bezier curve approximation

var t0 = 0.15;
var t1 = 0.5;
var t2 = 0.85;

var bPts = this.generateBarrelBezierPts(width + 2 * padding, height + 2 * padding, nodeX, nodeY);

var pts = [].concat(bPts.topLeft, bPts.topRight, bPts.bottomRight, bPts.bottomLeft);
var approximateBarrelCurvePts = function approximateBarrelCurvePts(pts) {
// approximate curve pts based on the two t values
var m0 = math.qbezierPtAt({ x: pts[0], y: pts[1] }, { x: pts[2], y: pts[3] }, { x: pts[4], y: pts[5] }, t0);
var m1 = math.qbezierPtAt({ x: pts[0], y: pts[1] }, { x: pts[2], y: pts[3] }, { x: pts[4], y: pts[5] }, t1);
var m2 = math.qbezierPtAt({ x: pts[0], y: pts[1] }, { x: pts[2], y: pts[3] }, { x: pts[4], y: pts[5] }, t2);

return [pts[0], pts[1], m0.x, m0.y, m1.x, m1.y, m2.x, m2.y, pts[4], pts[5]];
};

var pts = [].concat(approximateBarrelCurvePts(bPts.topLeft), approximateBarrelCurvePts(bPts.topRight), approximateBarrelCurvePts(bPts.bottomRight), approximateBarrelCurvePts(bPts.bottomLeft));

return math.polygonIntersectLine(x, y, pts, nodeX, nodeY);
},
Expand Down Expand Up @@ -29051,7 +29066,7 @@ module.exports = Stylesheet;
"use strict";


module.exports = "3.2.9";
module.exports = "3.2.10";

/***/ })
/******/ ]);
Expand Down
21 changes: 18 additions & 3 deletions dist/cytoscape.js
Original file line number Diff line number Diff line change
Expand Up @@ -2524,7 +2524,7 @@ elesfn.remove = function (notifyRenderer) {

function add(ele) {
var alreadyAdded = elesToRemoveIds[ele.id()];
if (alreadyAdded) {
if (ele.removed() || alreadyAdded) {
return;
} else {
elesToRemoveIds[ele.id()] = true;
Expand Down Expand Up @@ -25571,9 +25571,24 @@ BRp.generateBarrel = function () {
},

intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) {
// use two fixed t values for the bezier curve approximation

var t0 = 0.15;
var t1 = 0.5;
var t2 = 0.85;

var bPts = this.generateBarrelBezierPts(width + 2 * padding, height + 2 * padding, nodeX, nodeY);

var pts = [].concat(bPts.topLeft, bPts.topRight, bPts.bottomRight, bPts.bottomLeft);
var approximateBarrelCurvePts = function approximateBarrelCurvePts(pts) {
// approximate curve pts based on the two t values
var m0 = math.qbezierPtAt({ x: pts[0], y: pts[1] }, { x: pts[2], y: pts[3] }, { x: pts[4], y: pts[5] }, t0);
var m1 = math.qbezierPtAt({ x: pts[0], y: pts[1] }, { x: pts[2], y: pts[3] }, { x: pts[4], y: pts[5] }, t1);
var m2 = math.qbezierPtAt({ x: pts[0], y: pts[1] }, { x: pts[2], y: pts[3] }, { x: pts[4], y: pts[5] }, t2);

return [pts[0], pts[1], m0.x, m0.y, m1.x, m1.y, m2.x, m2.y, pts[4], pts[5]];
};

var pts = [].concat(approximateBarrelCurvePts(bPts.topLeft), approximateBarrelCurvePts(bPts.topRight), approximateBarrelCurvePts(bPts.bottomRight), approximateBarrelCurvePts(bPts.bottomLeft));

return math.polygonIntersectLine(x, y, pts, nodeX, nodeY);
},
Expand Down Expand Up @@ -29813,7 +29828,7 @@ module.exports = Stylesheet;
"use strict";


module.exports = "3.2.9";
module.exports = "3.2.10";

/***/ })
/******/ ]);
Expand Down
4 changes: 2 additions & 2 deletions 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.9",
"version": "3.2.10",

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions 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.9",
"version": "3.2.10",
"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.9";
module.exports = "3.2.10";

0 comments on commit 573611a

Please sign in to comment.