Merge branch 'master' of github.com:Connoropolous/metamaps_gen002
This commit is contained in:
commit
41333c1991
3 changed files with 17 additions and 4 deletions
|
@ -61,6 +61,9 @@ function nodeDoubleClickHandler(node, e) {
|
|||
|
||||
}//doubleClickNodeHandler
|
||||
|
||||
/*
|
||||
* Returns a boolean saying if the node was double clicked in our understanding of the word
|
||||
*/
|
||||
function nodeWasDoubleClicked() {
|
||||
//grab the timestamp of the click
|
||||
var storedTime = MetamapsModel.lastNodeClick;
|
||||
|
@ -294,4 +297,4 @@ function touchPanZoomHandler(eventInfo, e) {
|
|||
lastDist = dist;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,17 @@ class SynapsesController < ApplicationController
|
|||
|
||||
respond_to :html, :js, :json
|
||||
|
||||
autocomplete :synapse, :desc, :full => true
|
||||
def autocomplete_synapse_desc
|
||||
term = params[:term]
|
||||
if term && !term.empty?
|
||||
items = Synapse.select('DISTINCT "desc"').
|
||||
where('LOWER("desc") like ?', term.downcase + '%').
|
||||
limit(10).order('"desc"')
|
||||
else
|
||||
items = {}
|
||||
end
|
||||
render :json => json_for_autocomplete(items, :desc)
|
||||
end
|
||||
|
||||
# GET synapses
|
||||
# or GET users/:user_id/synapses
|
||||
|
|
|
@ -72,7 +72,7 @@ if (!$.isEmptyObject(Mconsole.graph.nodes)) {
|
|||
modes: ['node-property:dim'],
|
||||
duration: 500,
|
||||
onComplete: function() {
|
||||
selectNodeOnClickHandler(temp);
|
||||
selectNode(temp);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -101,7 +101,7 @@ if (!$.isEmptyObject(Mconsole.graph.nodes)) {
|
|||
modes: ['node-property:dim'],
|
||||
duration: 500,
|
||||
onComplete: function() {
|
||||
selectNodeOnClickHandler(temp);
|
||||
selectNode(temp);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue