multi links

  • 1
  • Question
  • Updated 8 years ago
how generate one single function to manage link:

//not run:
Seadragon.Utils.addEvent(control, "touchstart",
function(event){
event.preventDefault();
onStartClickGeneric('bb');
}

//run:
Seadragon.Utils.addEvent(img, "touchstart", onStartClick_10_0);

//link activate only on doubleclick
function onStartClickGeneric(link) {

if ((!flag)||(!flag2)) {
flag = true;
flag2 = false;
setTimeout(function () { flag = false; }, 400);
setTimeout(function () { flag2 = true; }, 100);
}
else {
event.preventDefault();
flag = false;
flag2 = false;
window.open(link, 'test', '');
}
}

function onStartClick_10_0(event) {
event.preventDefault();

if ((!flag)||(!flag2)) {
flag = true;
flag2 = false;
setTimeout(function () { flag = false; }, 400);
setTimeout(function () { flag2 = true; }, 100);
}
else {
event.preventDefault();
flag = false;
flag2 = false;
window.open('http://www.restivo.it', 'test', '');
}
}

thanks in advance for the help

mario
Photo of Flavio Mario Signani

Flavio Mario Signani

  • 1 Post
  • 0 Reply Likes

Posted 8 years ago

  • 1

Be the first to post a reply!