fix movement
This commit is contained in:
parent
9d5447bbb2
commit
813606ba08
@ -123,7 +123,7 @@
|
||||
ui = {
|
||||
dialog: function(id, position, html) {
|
||||
var el, left, top, _ref;
|
||||
ui.el = el = document.createElement('div');
|
||||
el = document.createElement('div');
|
||||
el.className = 'reply dialog';
|
||||
el.innerHTML = html;
|
||||
el.id = id;
|
||||
@ -174,7 +174,7 @@
|
||||
},
|
||||
move: function(e) {
|
||||
var el, rect;
|
||||
el = ui.el;
|
||||
ui.el = el = e.target.parentNode;
|
||||
rect = el.getBoundingClientRect();
|
||||
ui.dx = e.clientX - rect.left;
|
||||
ui.dy = e.clientY - rect.top;
|
||||
|
||||
@ -53,7 +53,7 @@ if typeof GM_deleteValue is 'undefined'
|
||||
|
||||
ui =
|
||||
dialog: (id, position, html) ->
|
||||
ui.el = el = document.createElement 'div'
|
||||
el = document.createElement 'div'
|
||||
el.className = 'reply dialog'
|
||||
el.innerHTML = html
|
||||
el.id = id
|
||||
@ -85,7 +85,7 @@ ui =
|
||||
(-> el.parentNode.removeChild(el)), true
|
||||
el
|
||||
move: (e) ->
|
||||
{el} = ui
|
||||
ui.el = el = e.target.parentNode
|
||||
#distance from pointer to el edge is constant; calculate it here.
|
||||
# XXX opera reports el.offsetLeft / el.offsetTop as 0
|
||||
rect = el.getBoundingClientRect()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user