fixed directionality and set circle radius to corrent length

This commit is contained in:
Connor Turland 2012-11-18 14:40:06 -05:00
parent f725b607d3
commit 13fc7d829f
4 changed files with 7 additions and 43 deletions

View file

@ -84,10 +84,10 @@ function initFD(){
this.edgeHelper.arrow.render({ x: pos.x, y: pos.y }, { x: posChild.x, y: posChild.y }, 40, true, canvas);
}
else if (direction == "from-to") {
this.edgeHelper.arrow.render({ x: pos.x, y: pos.y }, { x: posChild.x, y: posChild.y }, 40, true, canvas);
this.edgeHelper.arrow.render({ x: pos.x, y: pos.y }, { x: posChild.x, y: posChild.y }, 40, false, canvas);
}
else if (direction == "to-from") {
this.edgeHelper.arrow.render({ x: pos.x, y: pos.y }, { x: posChild.x, y: posChild.y }, 40, false, canvas);
this.edgeHelper.arrow.render({ x: pos.x, y: pos.y }, { x: posChild.x, y: posChild.y }, 40, true, canvas);
}
//check for edge label in data
@ -230,7 +230,7 @@ function initFD(){
//Number of iterations for the FD algorithm
iterations: 200,
//Edge length
levelDistance: 150,
levelDistance: 200,
// Add text to the labels. This method is only triggered
// on label creation and only for DOM labels (not native canvas ones).
onCreateLabel: function(domElement, node){

View file

@ -84,10 +84,10 @@ function initRG(){
this.edgeHelper.arrow.render({ x: pos.x, y: pos.y }, { x: posChild.x, y: posChild.y }, 40, true, canvas);
}
else if (direction == "from-to") {
this.edgeHelper.arrow.render({ x: pos.x, y: pos.y }, { x: posChild.x, y: posChild.y }, 40, true, canvas);
this.edgeHelper.arrow.render({ x: pos.x, y: pos.y }, { x: posChild.x, y: posChild.y }, 40, false, canvas);
}
else if (direction == "to-from") {
this.edgeHelper.arrow.render({ x: pos.x, y: pos.y }, { x: posChild.x, y: posChild.y }, 40, false, canvas);
this.edgeHelper.arrow.render({ x: pos.x, y: pos.y }, { x: posChild.x, y: posChild.y }, 40, true, canvas);
}
//check for edge label in data
@ -237,7 +237,7 @@ function initRG(){
//Number of iterations for the rg algorithm
iterations: 200,
//Edge length
levelDistance: 150,
levelDistance: 200,
// Add text to the labels. This method is only triggered
// on label creation and only for DOM labels (not native canvas ones).
onCreateLabel: function(domElement, node){

View file

@ -3114,7 +3114,7 @@ var Canvas;
this.viz = viz;
this.config = $.merge({
idSuffix: '-bkcanvas',
levelDistance: 100,
levelDistance: 200,
numberOfCircles: 6,
CanvasStyles: {},
offset: 0

View file

@ -1,36 +0,0 @@
// Place all the styles related to the items controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.item { display:block; float:left; position:relative; width:170px; height:300px; padding:10px 10px 10px 35px; background: url('bg.png'); border-radius:15px; margin:30px 0 30px 50px; color:#000; }
.item .delete {position: absolute;
top: -14px;
left: 0px;
background: none;
border: 0;
color: white;
border: none;
font-size: 14px;
margin: 0;
padding: 0;
cursor:pointer;
}
.item .type {position: absolute;
color: white;
top: -22px;
right: 0;
font-weight: bold;
font-size: 20px;
line-height: 24px;}
.item .icon { position:absolute; top:135px; left:-25px; }
.item .title { font-size:22px; line-height:25px; display:block; border-bottom:2px solid #000; padding-bottom:5px; }
.item .desc { font-size:15px; }
.item .desc h3 { font-style:normal; margin-top:5px; }
.item .link { position:absolute; width:170px; top:295px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }