mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-18 10:07:11 +01:00
Use pageX instead of clientX
This commit is contained in:
parent
edb09cc2df
commit
a23e3c02a4
1 changed files with 2 additions and 2 deletions
|
@ -41,9 +41,9 @@ class app.views.Resizer extends app.View
|
|||
onDrag: (event) =>
|
||||
return if @lastDrag and @lastDrag > Date.now() - 50
|
||||
@lastDrag = Date.now()
|
||||
@resize(event.clientX, false)
|
||||
@resize(event.pageX, false)
|
||||
return
|
||||
|
||||
onDragEnd: (event) =>
|
||||
@resize(event.clientX or (event.screenX - window.screenX), true)
|
||||
@resize(event.pageX or (event.screenX - window.screenX), true)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue