From 13fc7d829f3b27b940cb685c32ff07f32b660845 Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Sun, 18 Nov 2012 14:40:06 -0500 Subject: [PATCH] fixed directionality and set circle radius to corrent length --- .../Jit/ForceDirected/metamapFD.js | 6 ++-- .../javascripts/Jit/RGraph/metamapRG.js | 6 ++-- app/assets/javascripts/Jit/jit.js | 2 +- items.css.scss | 36 ------------------- 4 files changed, 7 insertions(+), 43 deletions(-) delete mode 100644 items.css.scss diff --git a/app/assets/javascripts/Jit/ForceDirected/metamapFD.js b/app/assets/javascripts/Jit/ForceDirected/metamapFD.js index 3b1abe82..a274f666 100644 --- a/app/assets/javascripts/Jit/ForceDirected/metamapFD.js +++ b/app/assets/javascripts/Jit/ForceDirected/metamapFD.js @@ -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){ diff --git a/app/assets/javascripts/Jit/RGraph/metamapRG.js b/app/assets/javascripts/Jit/RGraph/metamapRG.js index d97c9044..6d8d5d4a 100644 --- a/app/assets/javascripts/Jit/RGraph/metamapRG.js +++ b/app/assets/javascripts/Jit/RGraph/metamapRG.js @@ -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){ diff --git a/app/assets/javascripts/Jit/jit.js b/app/assets/javascripts/Jit/jit.js index 301f2cc0..71dec2b4 100644 --- a/app/assets/javascripts/Jit/jit.js +++ b/app/assets/javascripts/Jit/jit.js @@ -3114,7 +3114,7 @@ var Canvas; this.viz = viz; this.config = $.merge({ idSuffix: '-bkcanvas', - levelDistance: 100, + levelDistance: 200, numberOfCircles: 6, CanvasStyles: {}, offset: 0 diff --git a/items.css.scss b/items.css.scss deleted file mode 100644 index 646ac2f4..00000000 --- a/items.css.scss +++ /dev/null @@ -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; } -