made it so that the synapse still appears even while you write the description of the connection

This commit is contained in:
Connor Turland 2012-12-21 00:08:52 -05:00
parent 355a6d4d0f
commit c92508d909
2 changed files with 18 additions and 13 deletions

View file

@ -70,7 +70,6 @@ function graphSettings(type) {
else if (e.button == 2) { else if (e.button == 2) {
if (tempInit == false) { if (tempInit == false) {
tempNode = node; tempNode = node;
console.log(tempNode);
tempInit = true; tempInit = true;
} }
// //

View file

@ -39,24 +39,30 @@ if (Mconsole != null) {
temp.setPos(new $jit.Complex(x, y), 'end'); temp.setPos(new $jit.Complex(x, y), 'end');
} }
Mconsole.fx.plotNode(temp, Mconsole.canvas);
Mconsole.fx.animate({
modes: ['node-property:dim'],
duration: 400
});
if ( '<%= @synapse %>' == "true" ) { if ( '<%= @synapse %>' == "true" ) {
renderMidArrow({ x: tempNode.pos.x, y: tempNode.pos.y }, { x: temp.pos.x, y: temp.pos.y }, 13, false, Mconsole.canvas);
Mconsole.fx.plotNode(tempNode, Mconsole.canvas);
Mconsole.fx.plotNode(temp, Mconsole.canvas);
$('#synapse_item1id').val(tempNode.id); $('#synapse_item1id').val(tempNode.id);
$('#synapse_item2id').val(temp.id); $('#synapse_item2id').val(temp.id);
$('#new_synapse').fadeIn('fast'); $('#new_synapse').fadeIn('fast');
$('#synapse_desc').focus(); $('#synapse_desc').focus();
Mconsole.fx.animate({
modes: ['node-property:dim'],
duration: 500,
onComplete: function() {
renderMidArrow({ x: tempNode.pos.x, y: tempNode.pos.y }, { x: temp.pos.x, y: temp.pos.y }, 13, false, Mconsole.canvas);
Mconsole.fx.plotNode(tempNode, Mconsole.canvas);
Mconsole.fx.plotNode(temp, Mconsole.canvas);
tempNode = null; tempNode = null;
tempNode2 = null; tempNode2 = null;
tempInit = false; tempInit = false;
} }
});
} else {
Mconsole.fx.plotNode(temp, Mconsole.canvas);
Mconsole.fx.animate({
modes: ['node-property:dim'],
duration: 500
});
}
} else { } else {
json = newnode; json = newnode;