Skip to content

Commit

Permalink
opera-related fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ondras committed Jan 31, 2014
1 parent eef7940 commit cbcd407
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
1 change: 0 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import url(font.css);
@import url(ui.css);
@import url(item.css);
@import url(shape.css);
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<script src="my-mind.js"></script>
<script src="https://cdn.firebase.com/v0/firebase.js"></script>
<script src="https://cdn.firebase.com/v0/firebase-simple-login.js"></script>
<link rel="stylesheet" href="css/font.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/print.css" media="print" />
</head>
Expand Down
7 changes: 4 additions & 3 deletions my-mind.js
Original file line number Diff line number Diff line change
Expand Up @@ -1957,8 +1957,8 @@ MM.Layout.Graph._drawHorizontalConnectors = function(item, side, children) {
/* rounded connectors */
var c1 = children[0];
var c2 = children[children.length-1];
var offset = dom.content.offsetWidth + R;
var x = x2;
var x = x2;
var xx = x + (side == "left" ? -R : R);

var y1 = c1.getShape().getVerticalAnchor(c1) + c1.getDOM().node.offsetTop;
var y2 = c2.getShape().getVerticalAnchor(c2) + c2.getDOM().node.offsetTop;
Expand All @@ -1967,9 +1967,10 @@ MM.Layout.Graph._drawHorizontalConnectors = function(item, side, children) {

ctx.beginPath();
ctx.moveTo(x1, y1);
ctx.lineTo(xx, y1)
ctx.arcTo(x, y1, x, y1+R, R);
ctx.lineTo(x, y2-R);
ctx.arcTo(x, y2, x2, y2, R);
ctx.arcTo(x, y2, xx, y2, R);
ctx.lineTo(x2, y2);

for (var i=1; i<children.length-1; i++) {
Expand Down
7 changes: 4 additions & 3 deletions src/layout.graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ MM.Layout.Graph._drawHorizontalConnectors = function(item, side, children) {
/* rounded connectors */
var c1 = children[0];
var c2 = children[children.length-1];
var offset = dom.content.offsetWidth + R;
var x = x2;
var x = x2;
var xx = x + (side == "left" ? -R : R);

var y1 = c1.getShape().getVerticalAnchor(c1) + c1.getDOM().node.offsetTop;
var y2 = c2.getShape().getVerticalAnchor(c2) + c2.getDOM().node.offsetTop;
Expand All @@ -165,9 +165,10 @@ MM.Layout.Graph._drawHorizontalConnectors = function(item, side, children) {

ctx.beginPath();
ctx.moveTo(x1, y1);
ctx.lineTo(xx, y1)
ctx.arcTo(x, y1, x, y1+R, R);
ctx.lineTo(x, y2-R);
ctx.arcTo(x, y2, x2, y2, R);
ctx.arcTo(x, y2, xx, y2, R);
ctx.lineTo(x2, y2);

for (var i=1; i<children.length-1; i++) {
Expand Down

0 comments on commit cbcd407

Please sign in to comment.