Skip to content

Commit

Permalink
Prep v0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
cpettitt committed Jan 3, 2015
1 parent 7ed20a8 commit 9a2237c
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 18 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dagre-d3",
"version": "0.4.1",
"version": "0.4.2",
"main": [
"dist/dagre-d3.core.js",
"dist/dagre-d3.core.min.js"
Expand Down
32 changes: 28 additions & 4 deletions dist/dagre-d3.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -958,12 +958,14 @@ function createOrSelectGroup(root, name) {

var intersectRect = require("./intersect/intersect-rect"),
intersectEllipse = require("./intersect/intersect-ellipse"),
intersectCircle = require("./intersect/intersect-circle");
intersectCircle = require("./intersect/intersect-circle"),
intersectPolygon = require("./intersect/intersect-polygon");

module.exports = {
rect: rect,
ellipse: ellipse,
circle: circle
circle: circle,
diamond: diamond
};

function rect(parent, bbox, node) {
Expand Down Expand Up @@ -1012,7 +1014,29 @@ function circle(parent, bbox, node) {
return shapeSvg;
}

},{"./intersect/intersect-circle":11,"./intersect/intersect-ellipse":12,"./intersect/intersect-rect":16}],25:[function(require,module,exports){
// Circumscribe an ellipse for the bounding box with a diamond shape. I derived
// the function to calculate the diamond shape from:
// http://mathforum.org/kb/message.jspa?messageID=3750236
function diamond(parent, bbox, node) {
var w = (bbox.width * Math.SQRT2) / 2,
h = (bbox.height * Math.SQRT2) / 2,
points = [
{ x: 0, y: -h },
{ x: -w, y: 0 },
{ x: 0, y: h },
{ x: w, y: 0 }
],
shapeSvg = parent.insert("polygon", ":first-child")
.attr("points", points.map(function(p) { return p.x + "," + p.y; }).join(" "));

node.intersect = function(p) {
return intersectPolygon(node, points, p);
};

return shapeSvg;
}

},{"./intersect/intersect-circle":11,"./intersect/intersect-ellipse":12,"./intersect/intersect-polygon":15,"./intersect/intersect-rect":16}],25:[function(require,module,exports){
var _ = require("./lodash");

// Public utility functions
Expand Down Expand Up @@ -1069,7 +1093,7 @@ function applyTransition(selection, g) {
}

},{"./lodash":20}],26:[function(require,module,exports){
module.exports = "0.4.1";
module.exports = "0.4.2";

},{}]},{},[1])(1)
});
2 changes: 1 addition & 1 deletion dist/dagre-d3.core.min.js

Large diffs are not rendered by default.

32 changes: 28 additions & 4 deletions dist/dagre-d3.js
Original file line number Diff line number Diff line change
Expand Up @@ -958,12 +958,14 @@ function createOrSelectGroup(root, name) {

var intersectRect = require("./intersect/intersect-rect"),
intersectEllipse = require("./intersect/intersect-ellipse"),
intersectCircle = require("./intersect/intersect-circle");
intersectCircle = require("./intersect/intersect-circle"),
intersectPolygon = require("./intersect/intersect-polygon");

module.exports = {
rect: rect,
ellipse: ellipse,
circle: circle
circle: circle,
diamond: diamond
};

function rect(parent, bbox, node) {
Expand Down Expand Up @@ -1012,7 +1014,29 @@ function circle(parent, bbox, node) {
return shapeSvg;
}

},{"./intersect/intersect-circle":11,"./intersect/intersect-ellipse":12,"./intersect/intersect-rect":16}],25:[function(require,module,exports){
// Circumscribe an ellipse for the bounding box with a diamond shape. I derived
// the function to calculate the diamond shape from:
// http://mathforum.org/kb/message.jspa?messageID=3750236
function diamond(parent, bbox, node) {
var w = (bbox.width * Math.SQRT2) / 2,
h = (bbox.height * Math.SQRT2) / 2,
points = [
{ x: 0, y: -h },
{ x: -w, y: 0 },
{ x: 0, y: h },
{ x: w, y: 0 }
],
shapeSvg = parent.insert("polygon", ":first-child")
.attr("points", points.map(function(p) { return p.x + "," + p.y; }).join(" "));

node.intersect = function(p) {
return intersectPolygon(node, points, p);
};

return shapeSvg;
}

},{"./intersect/intersect-circle":11,"./intersect/intersect-ellipse":12,"./intersect/intersect-polygon":15,"./intersect/intersect-rect":16}],25:[function(require,module,exports){
var _ = require("./lodash");

// Public utility functions
Expand Down Expand Up @@ -1069,7 +1093,7 @@ function applyTransition(selection, g) {
}

},{"./lodash":20}],26:[function(require,module,exports){
module.exports = "0.4.1";
module.exports = "0.4.2";

},{}],27:[function(require,module,exports){
/*
Expand Down
10 changes: 5 additions & 5 deletions dist/dagre-d3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = "0.4.2-pre";
module.exports = "0.4.2";
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dagre-d3",
"version": "0.4.2-pre",
"version": "0.4.2",
"description": "A D3-based renderer for Dagre",
"author": "Chris Pettitt <chris@samsarin.com>",
"keywords": [
Expand Down Expand Up @@ -38,4 +38,4 @@
"url": "https://github.com/cpettitt/dagre-d3.git"
},
"license": "MIT"
}
}

0 comments on commit 9a2237c

Please sign in to comment.