From 5839ca191cf3319175abb788934040f592f2ff1f Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Sat, 3 Nov 2012 20:43:05 -0400 Subject: [PATCH] corrected directionality to point right way --- app/assets/javascripts/Jit/ForceDirected/metamapFD.js | 4 ++-- app/assets/javascripts/Jit/RGraph/metamapRG.js | 4 ++-- app/views/synapses/edit.html.erb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/Jit/ForceDirected/metamapFD.js b/app/assets/javascripts/Jit/ForceDirected/metamapFD.js index 1be37d76..3bd9897d 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, false, canvas); + this.edgeHelper.arrow.render({ x: pos.x, y: pos.y }, { x: posChild.x, y: posChild.y }, 40, true, canvas); } else if (direction == "to-from") { - 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); } //check for edge label in data diff --git a/app/assets/javascripts/Jit/RGraph/metamapRG.js b/app/assets/javascripts/Jit/RGraph/metamapRG.js index 9cef5594..3387c9e9 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, false, canvas); + this.edgeHelper.arrow.render({ x: pos.x, y: pos.y }, { x: posChild.x, y: posChild.y }, 40, true, canvas); } else if (direction == "to-from") { - 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); } //check for edge label in data diff --git a/app/views/synapses/edit.html.erb b/app/views/synapses/edit.html.erb index a287fe34..b5ad3a1a 100644 --- a/app/views/synapses/edit.html.erb +++ b/app/views/synapses/edit.html.erb @@ -1,7 +1,7 @@ <%= form_for @synapse, url: user_synapse_url do |form| %>

Edit Synapse

<% if Item.visibleToUser(user, nil).count > 0 %> - + <%= select "node1_id", "node1", Item.order("name ASC").visibleToUser(user, nil).map {|p| [ p.name, p.id ] }, { :selected => @synapse.node1_id } %> <% end %> @@ -9,7 +9,7 @@ <%= form.text_field :desc, class: "description" %> <% if Item.visibleToUser(user, nil).count > 0 %> - + <%= select "node2_id", "node2", Item.order("name ASC").visibleToUser(user, nil).map {|p| [ p.name, p.id ] }, { :selected => @synapse.node2_id } %> <% end %>