hope to have fixed the double click to open topic card issue

This commit is contained in:
Connor Turland 2014-02-26 14:45:01 -08:00
parent 762fc21e9e
commit 428462abf5

View file

@ -179,12 +179,14 @@ function nodeWasDoubleClicked() {
function selectNodeOnClickHandler(node, e) { function selectNodeOnClickHandler(node, e) {
if (Mconsole.busy) return; if (Mconsole.busy) return;
if (nodeWasDoubleClicked()) { var check = nodeWasDoubleClicked();
if (check) {
nodeDoubleClickHandler(node, e); nodeDoubleClickHandler(node, e);
return; return;
} } else {
// wait a certain length of time, then check again, then run this code
//set final styles setTimeout(function() {
if (!nodeWasDoubleClicked()) {
if (!e.shiftKey) { if (!e.shiftKey) {
Mconsole.graph.eachNode(function (n) { Mconsole.graph.eachNode(function (n) {
if (n.id != node.id) { if (n.id != node.id) {
@ -203,6 +205,9 @@ function selectNodeOnClickHandler(node, e) {
duration: 500 duration: 500
}); });
Mconsole.plot(); Mconsole.plot();
}
}, MetamapsModel.DOUBLE_CLICK_TOLERANCE);
}
}//selectNodeOnClickHandler }//selectNodeOnClickHandler
function selectNodeOnRightClickHandler(node, e) { function selectNodeOnRightClickHandler(node, e) {