fixed autocomplete bugginess, fixed synapse half opacity bug

This commit is contained in:
Connor Turland 2013-02-15 20:00:05 -05:00
parent 759e6aa0bd
commit a1c5a82ac4
20 changed files with 17 additions and 14 deletions

View file

@ -83,7 +83,8 @@ function canvasDoubleClickHandler(canvasLoc,e) {
$('#new_topic').css('left', e.clientX + "px");
$('#new_topic').css('top', e.clientY + "px");
$('#topic_x').val(canvasLoc.x);
$('#topic_y').val(canvasLoc.y);
$('#topic_y').val(canvasLoc.y);
$('#topic_name').autocomplete('enable');
$('#new_topic').fadeIn('fast');
addMetacode();
$('#topic_name').focus();
@ -106,9 +107,9 @@ function onDragMoveTopicHandler(node, eventInfo, e) {
// if it's a left click, move the node
if (e.button == 0 && !e.altKey && (e.buttons == 0 || e.buttons == 1 || e.buttons == undefined)) {
dragged = node.id;
node.pos.setc(pos.x, pos.y);
node.data.$xloc = pos.x;
node.data.$yloc = pos.y;
node.pos.setc(pos.x, pos.y);
node.data.$xloc = pos.x;
node.data.$yloc = pos.y;
Mconsole.plot();
}
// if it's a right click or holding down alt, start synapse creation ->third option is for firefox

View file

@ -412,6 +412,7 @@ function onDragEndTopicHandler(node, eventInfo, e, allowRealtime) {
$('#topic_addSynapse').val("false");
$('#synapse_topic1id').val(tempNode.id);
$('#synapse_topic2id').val(tempNode2.id);
$('#synapse_desc').autocomplete('enable');
$('#new_synapse').fadeIn('fast');
$('#synapse_desc').focus();
tempNode = null;

View file

@ -9,6 +9,7 @@
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require_tree ../../../vendor/assets/stylesheets
*= require_tree .
*= require base
*= require ForceDirected

View file

@ -91,7 +91,7 @@ class TopicsController < ApplicationController
@synapse = "false"
if params[:topic][:addSynapse] == "true"
@synapse = "true"
end
end
# also create an object to return the position to the canvas
@position = Hash.new()

View file

@ -2,6 +2,7 @@
* @file
* Javascript called when you create a new synapse.
*/
$('#synapse_desc').autocomplete('disable');
$('#new_synapse').fadeOut('fast');
$('#synapse_desc').attr('value','');
$('#synapse_topic1id').attr('value','0');
@ -32,10 +33,6 @@ if ( Mconsole != null) {
temp.data.$direction = d;
Mconsole.fx.plotLine(temp, Mconsole.canvas);
selectEdge(temp);
Mconsole.fx.animate({
modes: ['edge-property:lineWidth:color'],
duration: 400
});
}
else {
json = <%= @synapse.selfplusnodes_as_json.html_safe %>

View file

@ -2,11 +2,8 @@
* @file
* This javascript is returned and executed when you create a new node.
*/
$('#new_topic').fadeOut('fast');
$('#topic_name').data().autocomplete.term = null;
$('.ui-autocomplete').children().remove();
$('.ui-autocomplete').css('display','none');
$('#topic_name').autocomplete('disable');
$('#topic_name').attr('value','');
$('#topic_grabTopic').attr('value','null');
$('#topic_addSynapse').attr('value','false');
@ -49,6 +46,7 @@ if (!$.isEmptyObject(Mconsole.graph.nodes)) {
if ( '<%= @synapse %>' == "true" ) {
$('#synapse_topic1id').val(tempNode.id);
$('#synapse_topic2id').val(temp.id);
$('#synapse_desc').autocomplete('enable');
$('#new_synapse').fadeIn('fast');
$('#synapse_desc').focus();
Mconsole.fx.animate({
@ -83,7 +81,7 @@ if (!$.isEmptyObject(Mconsole.graph.nodes)) {
temp.setData('dim', 25, 'end');
temp.setData('onCanvas', false);
temp.setData('inCommons', false);
if (gType == "arranged" || gType == "chaotic") {
if ((gType == "arranged" || gType == "chaotic") && mapid != null) {
temp.setData('mappingid', <%= @mapping.id %>);
}
temp.setPos(new $jit.Complex(x, y), 'current');

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

File diff suppressed because one or more lines are too long