Skip to content

Commit

Permalink
fix(TouchPan): mouseAllDir should call handler immediately #6098
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed Jan 14, 2020
1 parent efc420a commit 68d1664
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ui/src/components/slider/slider-utils.js
Expand Up @@ -168,7 +168,9 @@ export let SliderMixin = {
}
else if (event.isFirst) {
this.dragging = this.__getDragging(event.evt)
console.log('started')
this.__updatePosition(event.evt)
this.__updateValue()
this.active = true
}
else {
Expand Down
10 changes: 8 additions & 2 deletions ui/src/directives/TouchPan.js
Expand Up @@ -220,9 +220,13 @@ export default {
lastX: pos.left,
lastY: pos.top
}

if (detected === true) {
ctx.move(evt, true)
}
},

move (evt) {
move (evt, startEvent) {
if (ctx.event === void 0) {
return
}
Expand All @@ -238,7 +242,9 @@ export default {
}
else {
if (ctx.event.isFirst === true) {
handleEvent(evt, ctx.event.mouse)
// mouse listener is passive, so avoid handling start event
startEvent !== true && handleEvent(evt, ctx.event.mouse)

document.documentElement.style.cursor = 'grabbing'
ctx.event.mouse === true && document.body.classList.add('no-pointer-events')
document.body.classList.add('non-selectable')
Expand Down

0 comments on commit 68d1664

Please sign in to comment.