node add to map tweak
This commit is contained in:
parent
480a9bcf99
commit
ded6ffe7e5
3 changed files with 9 additions and 7 deletions
|
@ -279,8 +279,4 @@ function init(){
|
|||
}
|
||||
});
|
||||
// end
|
||||
fd.graph.eachNode(function(n) {
|
||||
var x = n.getData('itemcatname');
|
||||
console.log(x);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
<%= form.text_area :desc, class: "description", :rows => 5 %>
|
||||
<label for="item_link">Link</label>
|
||||
<%= form.text_field :link, class: "link" %>
|
||||
<%= form.submit "Add Item", class: "add" %>
|
||||
<%= form.submit "Add Item", class: "addItem", id: "addItem" %>
|
||||
<% end %>
|
|
@ -1,5 +1,11 @@
|
|||
$('#new_item').fadeOut('fast');
|
||||
$('#new_item')[0].reset()
|
||||
var newnode = <%= @item.self_as_json.html_safe %>;
|
||||
console.log(newnode);
|
||||
fd.graph.addNode(newnode);
|
||||
fd.plot();
|
||||
var temp = fd.graph.getNode('<%= @item.id %>');
|
||||
temp.setData('dim', 1, 'start');
|
||||
temp.setData('dim', 40, 'end');
|
||||
fd.fx.animate({
|
||||
modes: ['node-property:dim'],
|
||||
duration: 400
|
||||
});
|
Loading…
Reference in a new issue