Skip to content

Commit

Permalink
fix: get touchBackend working with default options (#1444)
Browse files Browse the repository at this point in the history
  • Loading branch information
darthtrevino committed Jul 6, 2019
1 parent cef21a6 commit 4aa600f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/core/touch-backend/src/TouchBackend.ts
Expand Up @@ -72,15 +72,15 @@ export default class TouchBackend implements Backend {
this._mouseClientOffset = {}
this._isScrolling = false

if (options.enableMouseEvents) {
if (this.options.enableMouseEvents) {
this.listenerTypes.push(ListenerType.mouse)
}

if (options.enableTouchEvents) {
if (this.options.enableTouchEvents) {
this.listenerTypes.push(ListenerType.touch)
}

if (options.enableKeyboardEvents) {
if (this.options.enableKeyboardEvents) {
this.listenerTypes.push(ListenerType.keyboard)
}
}
Expand Down
3 changes: 1 addition & 2 deletions packages/documentation/docsite/src/components/layout.tsx
Expand Up @@ -22,8 +22,7 @@ export interface LayoutProps {
hideSidebar?: boolean
}

const touchBackendOptions = { enableMouseEvents: true }

const touchBackendOptions = { delay: 5 }
const Layout: React.FC<LayoutProps> = props => {
const { children, location } = props
const sitepath = location && location.pathname
Expand Down

0 comments on commit 4aa600f

Please sign in to comment.