Get rid of mouse out and remove handlers
This commit is contained in:
parent
74ae33e232
commit
4600ea19e6
1 changed files with 3 additions and 19 deletions
|
@ -226,13 +226,7 @@
|
|||
eparent.className = 'shortcut selected';
|
||||
firstNode = eparent.id;
|
||||
}
|
||||
out();
|
||||
remove();
|
||||
};
|
||||
|
||||
var remove = function () {
|
||||
document.RemoveEventListener('click', click, false);
|
||||
document.RemoveEventListener('mouseout', out, false);
|
||||
};
|
||||
|
||||
var up = function (ev) {
|
||||
|
@ -248,6 +242,9 @@
|
|||
};
|
||||
|
||||
var over = function (ev) {
|
||||
if (ev == undefined)
|
||||
return;
|
||||
|
||||
var ele = ev.target;
|
||||
var eparent = get_dial_div (ele);
|
||||
|
||||
|
@ -262,18 +259,6 @@
|
|||
}
|
||||
ele.style.cursor = cursor;
|
||||
}
|
||||
var out = function (ev) {
|
||||
var ele = ev.target;
|
||||
var eparent = get_dial_div (ev);
|
||||
if (firstNode != undefined) {
|
||||
for (var i = 0; i <= dial.length; i++) {
|
||||
if (eparent.id != firstNode.id && dial[i].id != eparent.id) {
|
||||
dial[i].className = 'shortcut';
|
||||
}
|
||||
}
|
||||
}
|
||||
ele.style.cursor = cursor;
|
||||
}
|
||||
|
||||
function swap () {
|
||||
console.log ("speed_dial-save-swap " + firstNode + " " + secondNode);
|
||||
|
@ -282,7 +267,6 @@
|
|||
document.addEventListener('mousedown', click, false);
|
||||
document.addEventListener('mouseup', up, false);
|
||||
document.addEventListener('mouseover', over, false);
|
||||
document.addEventListener('mouseout', out, false);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
Loading…
Reference in a new issue