@use-gesture/core
Advanced tools
Comparing version 10.0.0-beta.13 to 10.0.0-beta.14
@@ -260,2 +260,9 @@ 'use strict'; | ||
if (sharedConfig.enabled) { | ||
for (const gestureKey of this.gestures) { | ||
if (this.config[gestureKey].enabled) { | ||
const Engine = actions_dist_useGestureCoreActions.EngineMap.get(gestureKey); | ||
new Engine(this, args, gestureKey).bind(bindFunction); | ||
} | ||
} | ||
for (const eventKey in this.nativeHandlers) { | ||
@@ -267,9 +274,2 @@ bindFunction(eventKey, '', event => this.nativeHandlers[eventKey](actions_dist_useGestureCoreActions._objectSpread2(actions_dist_useGestureCoreActions._objectSpread2({}, this.state.shared), {}, { | ||
} | ||
for (const gestureKey of this.gestures) { | ||
if (this.config[gestureKey].enabled) { | ||
const Engine = actions_dist_useGestureCoreActions.EngineMap.get(gestureKey); | ||
new Engine(this, args, gestureKey).bind(bindFunction); | ||
} | ||
} | ||
} | ||
@@ -295,2 +295,3 @@ | ||
function resolveGestures(ctrl, internalHandlers) { | ||
if (internalHandlers.hover) setupGesture(ctrl, 'hover'); | ||
if (internalHandlers.drag) setupGesture(ctrl, 'drag'); | ||
@@ -301,3 +302,2 @@ if (internalHandlers.wheel) setupGesture(ctrl, 'wheel'); | ||
if (internalHandlers.pinch) setupGesture(ctrl, 'pinch'); | ||
if (internalHandlers.hover) setupGesture(ctrl, 'hover'); | ||
} | ||
@@ -304,0 +304,0 @@ |
@@ -256,2 +256,9 @@ 'use strict'; | ||
if (sharedConfig.enabled) { | ||
for (const gestureKey of this.gestures) { | ||
if (this.config[gestureKey].enabled) { | ||
const Engine = actions_dist_useGestureCoreActions.EngineMap.get(gestureKey); | ||
new Engine(this, args, gestureKey).bind(bindFunction); | ||
} | ||
} | ||
for (const eventKey in this.nativeHandlers) { | ||
@@ -263,9 +270,2 @@ bindFunction(eventKey, '', event => this.nativeHandlers[eventKey](actions_dist_useGestureCoreActions._objectSpread2(actions_dist_useGestureCoreActions._objectSpread2({}, this.state.shared), {}, { | ||
} | ||
for (const gestureKey of this.gestures) { | ||
if (this.config[gestureKey].enabled) { | ||
const Engine = actions_dist_useGestureCoreActions.EngineMap.get(gestureKey); | ||
new Engine(this, args, gestureKey).bind(bindFunction); | ||
} | ||
} | ||
} | ||
@@ -291,2 +291,3 @@ | ||
function resolveGestures(ctrl, internalHandlers) { | ||
if (internalHandlers.hover) setupGesture(ctrl, 'hover'); | ||
if (internalHandlers.drag) setupGesture(ctrl, 'drag'); | ||
@@ -297,3 +298,2 @@ if (internalHandlers.wheel) setupGesture(ctrl, 'wheel'); | ||
if (internalHandlers.pinch) setupGesture(ctrl, 'pinch'); | ||
if (internalHandlers.hover) setupGesture(ctrl, 'hover'); | ||
} | ||
@@ -300,0 +300,0 @@ |
@@ -256,2 +256,9 @@ import { S as SUPPORT, C as ConfigResolverMap, _ as _objectSpread2, a as _defineProperty, t as toDomEventType, i as isTouch, b as touchIds, c as toReactHandlerProp, E as EngineMap, d as chain } from './actions-1e66897e.esm.js'; | ||
if (sharedConfig.enabled) { | ||
for (const gestureKey of this.gestures) { | ||
if (this.config[gestureKey].enabled) { | ||
const Engine = EngineMap.get(gestureKey); | ||
new Engine(this, args, gestureKey).bind(bindFunction); | ||
} | ||
} | ||
for (const eventKey in this.nativeHandlers) { | ||
@@ -263,9 +270,2 @@ bindFunction(eventKey, '', event => this.nativeHandlers[eventKey](_objectSpread2(_objectSpread2({}, this.state.shared), {}, { | ||
} | ||
for (const gestureKey of this.gestures) { | ||
if (this.config[gestureKey].enabled) { | ||
const Engine = EngineMap.get(gestureKey); | ||
new Engine(this, args, gestureKey).bind(bindFunction); | ||
} | ||
} | ||
} | ||
@@ -291,2 +291,3 @@ | ||
function resolveGestures(ctrl, internalHandlers) { | ||
if (internalHandlers.hover) setupGesture(ctrl, 'hover'); | ||
if (internalHandlers.drag) setupGesture(ctrl, 'drag'); | ||
@@ -297,3 +298,2 @@ if (internalHandlers.wheel) setupGesture(ctrl, 'wheel'); | ||
if (internalHandlers.pinch) setupGesture(ctrl, 'pinch'); | ||
if (internalHandlers.hover) setupGesture(ctrl, 'hover'); | ||
} | ||
@@ -300,0 +300,0 @@ |
{ | ||
"name": "@use-gesture/core", | ||
"version": "10.0.0-beta.13", | ||
"version": "10.0.0-beta.14", | ||
"description": "Core engine for receiving gestures", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -108,2 +108,11 @@ import { EngineMap } from './actions' | ||
if (sharedConfig.enabled) { | ||
// Adding gesture handlers | ||
for (const gestureKey of this.gestures) { | ||
if (this.config[gestureKey]!.enabled) { | ||
const Engine = EngineMap.get(gestureKey)! | ||
// @ts-ignore | ||
new Engine(this, args, gestureKey).bind(bindFunction) | ||
} | ||
} | ||
// Adding native handlers | ||
@@ -120,11 +129,2 @@ for (const eventKey in this.nativeHandlers) { | ||
} | ||
// Adding gesture handlers | ||
for (const gestureKey of this.gestures) { | ||
if (this.config[gestureKey]!.enabled) { | ||
const Engine = EngineMap.get(gestureKey)! | ||
// @ts-ignore | ||
new Engine(this, args, gestureKey).bind(bindFunction) | ||
} | ||
} | ||
} | ||
@@ -150,2 +150,6 @@ | ||
function resolveGestures(ctrl: Controller, internalHandlers: InternalHandlers) { | ||
// make sure hover handlers are added first to prevent bugs such as #322 | ||
// where the hover pointerLeave handler is removed before the move | ||
// pointerLeave, which prevents hovering: false to be fired. | ||
if (internalHandlers.hover) setupGesture(ctrl, 'hover') | ||
if (internalHandlers.drag) setupGesture(ctrl, 'drag') | ||
@@ -156,3 +160,2 @@ if (internalHandlers.wheel) setupGesture(ctrl, 'wheel') | ||
if (internalHandlers.pinch) setupGesture(ctrl, 'pinch') | ||
if (internalHandlers.hover) setupGesture(ctrl, 'hover') | ||
} | ||
@@ -159,0 +162,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
278286
8281