Revert "fixed bug that wasn't letting you save the layout of a map if you had added new synapses to it."

This reverts commit 698690effd.
This commit is contained in:
Devin Howard 2012-12-09 19:43:53 -05:00
parent baaa746a47
commit 31ab10b338
2 changed files with 2 additions and 12 deletions

View file

@ -89,7 +89,7 @@ class SynapsesController < ApplicationController
respond_to do |format|
format.html { respond_with(@user, location: user_synapse_url(@user, @synapse)) }
format.js { respond_with(@synapse, @mapping1, @mapping2) }
format.js { respond_with(@synapse) }
end
end

View file

@ -18,7 +18,7 @@ if (map1 != null) {
mymap = map;
}
if (mymap == fd || mymap == rg || mymap == map) {
if (mymap == fd || mymap == rg || mymap = map) {
temp1 = mymap.graph.getNode(<%= @synapse.item1.id %>);
if (temp1 == null) {
newnode = <%= @synapse.item1.self_as_json.html_safe %>;
@ -36,11 +36,6 @@ if (map1 != null) {
temp.setPos(new $jit.Polar(5.54, 347.6), 'start');
temp.setPos(new $jit.Polar(5.54, 347.6), 'end');
}
<% unless (@mapping1.nil?) %>
temp.setData('xloc',0);
temp.setData('yloc',0);
temp.setData('mappingid', '<%= @mapping1.id %>');
<% end %>
mymap.fx.plotNode(temp, mymap.canvas);
temp1 = mymap.graph.getNode(<%= @synapse.item1.id %>);
}
@ -61,11 +56,6 @@ if (map1 != null) {
temp.setPos(new $jit.Polar(5.54, 347.6), 'start');
temp.setPos(new $jit.Polar(5.54, 347.6), 'end');
}
<% unless (@mapping2.nil?) %>
temp.setData('xloc',0);
temp.setData('yloc',0);
temp.setData('mappingid', '<%= @mapping2.id %>');
<% end %>
mymap.fx.plotNode(temp, mymap.canvas);
temp2 = mymap.graph.getNode(<%= @synapse.item2.id %>);
}