Socket
Socket
Sign inDemoInstall

@antv/g-gesture

Package Overview
Dependencies
Maintainers
64
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-gesture - npm Package Compare versions

Comparing version 0.0.73 to 0.0.74

358

dist/index.esm.js
import EE from 'eventemitter3';
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
_setPrototypeOf(subClass, superClass);
function _typeof(obj) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
Object.defineProperty(subClass, "prototype", {
writable: false
});
if (superClass) _setPrototypeOf(subClass, superClass);
}
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
function _setPrototypeOf(o, p) {

@@ -15,2 +63,13 @@ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {

}
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
return true;
} catch (e) {
return false;
}
}
function _assertThisInitialized(self) {

@@ -22,4 +81,40 @@ if (self === void 0) {

}
function _possibleConstructorReturn(self, call) {
if (call && (typeof call === "object" || typeof call === "function")) {
return call;
} else if (call !== void 0) {
throw new TypeError("Derived constructors may only return object or undefined");
}
return _assertThisInitialized(self);
}
function _createSuper(Derived) {
var hasNativeReflectConstruct = _isNativeReflectConstruct();
return function _createSuperInternal() {
var Super = _getPrototypeOf(Derived),
result;
if (hasNativeReflectConstruct) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return _possibleConstructorReturn(this, result);
};
}
function _toPrimitive(input, hint) {
if (typeof input !== "object" || input === null) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if (typeof res !== "object") return res;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}
function _toPropertyKey(arg) {
var key = _toPrimitive(arg, "string");
return typeof key === "symbol" ? key : String(key);
}
var clock = typeof performance === 'object' && performance.now ? performance : Date;
var clock = (typeof performance === "undefined" ? "undefined" : _typeof(performance)) === 'object' && performance.now ? performance : Date;
var PRESS_DELAY = 250;

@@ -51,3 +146,4 @@ // 计算滑动的方向

var Gesture = /*#__PURE__*/function (_EE) {
_inheritsLoose(Gesture, _EE);
_inherits(Gesture, _EE);
var _super = _createSuper(Gesture);
// 用来记录当前触发的事件

@@ -57,3 +153,4 @@

var _this;
_this = _EE.call(this) || this;
_classCallCheck(this, Gesture);
_this = _super.call(this);
_this.el = void 0;

@@ -110,2 +207,3 @@ _this.evCache = [];

// 如果touchstart后停顿250ms, 则也触发press事件
// @ts-ignore
_this.pressTimeout = setTimeout(function () {

@@ -267,2 +365,17 @@ // 这里固定触发press事件

};
_this._cancel = function (ev) {
var _assertThisInitialize5 = _assertThisInitialized(_this),
evCache = _assertThisInitialize5.evCache,
startPoints = _assertThisInitialize5.startPoints;
var points = evCache.map(function (ev) {
return {
x: ev.x,
y: ev.y
};
});
ev.points = points;
_this.emitEnd(ev);
_this.evCache = [];
_this.reset();
};
_this.el = el;

@@ -272,121 +385,138 @@ _this._initEvent();

}
var _proto = Gesture.prototype;
_proto._initEvent = function _initEvent() {
var el = this.el;
el.addEventListener('pointerdown', this._start);
el.addEventListener('pointermove', this._move);
el.addEventListener('pointerup', this._end);
el.addEventListener('pointerupoutside', this._end);
};
_proto.getEventType = function getEventType(point) {
var eventType = this.eventType,
startTime = this.startTime,
startPoints = this.startPoints;
if (eventType) {
return eventType;
_createClass(Gesture, [{
key: "_initEvent",
value: function _initEvent() {
var el = this.el;
el.addEventListener('pointerdown', this._start);
el.addEventListener('pointermove', this._move);
el.addEventListener('pointerup', this._end);
el.addEventListener('pointercancel', this._cancel);
el.addEventListener('pointerupoutside', this._end);
}
var type;
// @ts-ignore
var panEventListeners = this._events.pan;
// 如果没有pan事件的监听,默认都是press
if (!panEventListeners) {
type = 'press';
} else {
// 如果有pan事件的处理,press则需要停顿250ms, 且移动距离小于10
var now = clock.now();
if (now - startTime > PRESS_DELAY && calcDistance(startPoints[0], point) < 10) {
}, {
key: "getEventType",
value: function getEventType(point) {
var eventType = this.eventType,
startTime = this.startTime,
startPoints = this.startPoints;
if (eventType) {
return eventType;
}
var type;
// @ts-ignore
var panEventListeners = this._events.pan;
// 如果没有pan事件的监听,默认都是press
if (!panEventListeners) {
type = 'press';
} else {
type = 'pan';
// 如果有pan事件的处理,press则需要停顿250ms, 且移动距离小于10
var now = clock.now();
if (now - startTime > PRESS_DELAY && calcDistance(startPoints[0], point) < 10) {
type = 'press';
} else {
type = 'pan';
}
}
this.eventType = type;
return type;
}
this.eventType = type;
return type;
};
_proto.enable = function enable(eventType) {
this.processEvent[eventType] = true;
}
// 是否进行中的事件
;
_proto.isProcess = function isProcess(eventType) {
return this.processEvent[eventType];
}
// 触发start事件
;
_proto.emitStart = function emitStart(type, ev) {
if (this.isProcess(type)) {
return;
}, {
key: "enable",
value: function enable(eventType) {
this.processEvent[eventType] = true;
}
this.enable(type);
this._emit(type + "start", ev);
}
// 触发事件
;
_proto._emit = function _emit(type, ev) {
var _el$ownerDocument,
_el$document,
_this2 = this;
// 主要是节流处理
this.pushEvent(type, ev);
var el = this.el,
throttleTimer = this.throttleTimer,
emitThrottles = this.emitThrottles;
if (throttleTimer) {
return;
// 是否进行中的事件
}, {
key: "isProcess",
value: function isProcess(eventType) {
return this.processEvent[eventType];
}
// @ts-ignore
var global = ((_el$ownerDocument = el.ownerDocument) === null || _el$ownerDocument === void 0 ? void 0 : _el$ownerDocument.defaultView) || ((_el$document = el.document) === null || _el$document === void 0 ? void 0 : _el$document.defaultView);
this.throttleTimer = global.requestAnimationFrame(function () {
for (var i = 0, len = emitThrottles.length; i < len; i++) {
var _emitThrottles$i = emitThrottles[i],
_type = _emitThrottles$i.type,
_ev = _emitThrottles$i.ev;
_this2.emit(_type, _ev);
// 触发start事件
}, {
key: "emitStart",
value: function emitStart(type, ev) {
if (this.isProcess(type)) {
return;
}
// 清空
_this2.throttleTimer = 0;
_this2.emitThrottles.length = 0;
});
}
// 触发end事件
;
_proto.emitEnd = function emitEnd(ev) {
var _this3 = this;
var processEvent = this.processEvent;
Object.keys(processEvent).forEach(function (type) {
_this3._emit(type + "end", ev);
delete processEvent[type];
});
};
_proto.pushEvent = function pushEvent(type, ev) {
var emitThrottles = this.emitThrottles;
var newEvent = {
type: type,
ev: ev
};
for (var i = 0, len = emitThrottles.length; i < len; i++) {
if (emitThrottles[i].type === type) {
emitThrottles.splice(i, 1, newEvent);
this.enable(type);
this._emit("".concat(type, "start"), ev);
}
// 触发事件
}, {
key: "_emit",
value: function _emit(type, ev) {
var _el$ownerDocument,
_el$document,
_this2 = this;
// 主要是节流处理
this.pushEvent(type, ev);
var el = this.el,
throttleTimer = this.throttleTimer,
emitThrottles = this.emitThrottles;
if (throttleTimer) {
return;
}
// @ts-ignore
var global = ((_el$ownerDocument = el.ownerDocument) === null || _el$ownerDocument === void 0 ? void 0 : _el$ownerDocument.defaultView) || ((_el$document = el.document) === null || _el$document === void 0 ? void 0 : _el$document.defaultView);
this.throttleTimer = global.requestAnimationFrame(function () {
for (var i = 0, len = emitThrottles.length; i < len; i++) {
var _emitThrottles$i = emitThrottles[i],
_type = _emitThrottles$i.type,
_ev = _emitThrottles$i.ev;
_this2.emit(_type, _ev);
}
// 清空
_this2.throttleTimer = 0;
_this2.emitThrottles.length = 0;
});
}
emitThrottles.push(newEvent);
};
_proto.clearPressTimeout = function clearPressTimeout() {
if (this.pressTimeout) {
clearTimeout(this.pressTimeout);
this.pressTimeout = null;
// 触发end事件
}, {
key: "emitEnd",
value: function emitEnd(ev) {
var _this3 = this;
var processEvent = this.processEvent;
Object.keys(processEvent).forEach(function (type) {
_this3._emit("".concat(type, "end"), ev);
delete processEvent[type];
});
}
};
_proto.reset = function reset() {
this.clearPressTimeout();
this.startTime = 0;
this.startDistance = 0;
this.direction = null;
this.eventType = null;
this.prevMoveTime = 0;
this.prevMovePoint = null;
this.lastMoveTime = 0;
this.lastMovePoint = null;
};
}, {
key: "pushEvent",
value: function pushEvent(type, ev) {
var emitThrottles = this.emitThrottles;
var newEvent = {
type: type,
ev: ev
};
for (var i = 0, len = emitThrottles.length; i < len; i++) {
if (emitThrottles[i].type === type) {
emitThrottles.splice(i, 1, newEvent);
return;
}
}
emitThrottles.push(newEvent);
}
}, {
key: "clearPressTimeout",
value: function clearPressTimeout() {
if (this.pressTimeout) {
clearTimeout(this.pressTimeout);
this.pressTimeout = null;
}
}
}, {
key: "reset",
value: function reset() {
this.clearPressTimeout();
this.startTime = 0;
this.startDistance = 0;
this.direction = null;
this.eventType = null;
this.prevMoveTime = 0;
this.prevMovePoint = null;
this.lastMoveTime = 0;
this.lastMovePoint = null;
}
}]);
return Gesture;

@@ -393,0 +523,0 @@ }(EE);

@@ -9,7 +9,55 @@ 'use strict';

function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
_setPrototypeOf(subClass, superClass);
function _typeof(obj) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
Object.defineProperty(subClass, "prototype", {
writable: false
});
if (superClass) _setPrototypeOf(subClass, superClass);
}
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
function _setPrototypeOf(o, p) {

@@ -22,2 +70,13 @@ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {

}
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
return true;
} catch (e) {
return false;
}
}
function _assertThisInitialized(self) {

@@ -29,4 +88,40 @@ if (self === void 0) {

}
function _possibleConstructorReturn(self, call) {
if (call && (typeof call === "object" || typeof call === "function")) {
return call;
} else if (call !== void 0) {
throw new TypeError("Derived constructors may only return object or undefined");
}
return _assertThisInitialized(self);
}
function _createSuper(Derived) {
var hasNativeReflectConstruct = _isNativeReflectConstruct();
return function _createSuperInternal() {
var Super = _getPrototypeOf(Derived),
result;
if (hasNativeReflectConstruct) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return _possibleConstructorReturn(this, result);
};
}
function _toPrimitive(input, hint) {
if (typeof input !== "object" || input === null) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if (typeof res !== "object") return res;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}
function _toPropertyKey(arg) {
var key = _toPrimitive(arg, "string");
return typeof key === "symbol" ? key : String(key);
}
var clock = typeof performance === 'object' && performance.now ? performance : Date;
var clock = (typeof performance === "undefined" ? "undefined" : _typeof(performance)) === 'object' && performance.now ? performance : Date;
var PRESS_DELAY = 250;

@@ -58,3 +153,4 @@ // 计算滑动的方向

var Gesture = /*#__PURE__*/function (_EE) {
_inheritsLoose(Gesture, _EE);
_inherits(Gesture, _EE);
var _super = _createSuper(Gesture);
// 用来记录当前触发的事件

@@ -64,3 +160,4 @@

var _this;
_this = _EE.call(this) || this;
_classCallCheck(this, Gesture);
_this = _super.call(this);
_this.el = void 0;

@@ -117,2 +214,3 @@ _this.evCache = [];

// 如果touchstart后停顿250ms, 则也触发press事件
// @ts-ignore
_this.pressTimeout = setTimeout(function () {

@@ -274,2 +372,17 @@ // 这里固定触发press事件

};
_this._cancel = function (ev) {
var _assertThisInitialize5 = _assertThisInitialized(_this),
evCache = _assertThisInitialize5.evCache,
startPoints = _assertThisInitialize5.startPoints;
var points = evCache.map(function (ev) {
return {
x: ev.x,
y: ev.y
};
});
ev.points = points;
_this.emitEnd(ev);
_this.evCache = [];
_this.reset();
};
_this.el = el;

@@ -279,121 +392,138 @@ _this._initEvent();

}
var _proto = Gesture.prototype;
_proto._initEvent = function _initEvent() {
var el = this.el;
el.addEventListener('pointerdown', this._start);
el.addEventListener('pointermove', this._move);
el.addEventListener('pointerup', this._end);
el.addEventListener('pointerupoutside', this._end);
};
_proto.getEventType = function getEventType(point) {
var eventType = this.eventType,
startTime = this.startTime,
startPoints = this.startPoints;
if (eventType) {
return eventType;
_createClass(Gesture, [{
key: "_initEvent",
value: function _initEvent() {
var el = this.el;
el.addEventListener('pointerdown', this._start);
el.addEventListener('pointermove', this._move);
el.addEventListener('pointerup', this._end);
el.addEventListener('pointercancel', this._cancel);
el.addEventListener('pointerupoutside', this._end);
}
var type;
// @ts-ignore
var panEventListeners = this._events.pan;
// 如果没有pan事件的监听,默认都是press
if (!panEventListeners) {
type = 'press';
} else {
// 如果有pan事件的处理,press则需要停顿250ms, 且移动距离小于10
var now = clock.now();
if (now - startTime > PRESS_DELAY && calcDistance(startPoints[0], point) < 10) {
}, {
key: "getEventType",
value: function getEventType(point) {
var eventType = this.eventType,
startTime = this.startTime,
startPoints = this.startPoints;
if (eventType) {
return eventType;
}
var type;
// @ts-ignore
var panEventListeners = this._events.pan;
// 如果没有pan事件的监听,默认都是press
if (!panEventListeners) {
type = 'press';
} else {
type = 'pan';
// 如果有pan事件的处理,press则需要停顿250ms, 且移动距离小于10
var now = clock.now();
if (now - startTime > PRESS_DELAY && calcDistance(startPoints[0], point) < 10) {
type = 'press';
} else {
type = 'pan';
}
}
this.eventType = type;
return type;
}
this.eventType = type;
return type;
};
_proto.enable = function enable(eventType) {
this.processEvent[eventType] = true;
}
// 是否进行中的事件
;
_proto.isProcess = function isProcess(eventType) {
return this.processEvent[eventType];
}
// 触发start事件
;
_proto.emitStart = function emitStart(type, ev) {
if (this.isProcess(type)) {
return;
}, {
key: "enable",
value: function enable(eventType) {
this.processEvent[eventType] = true;
}
this.enable(type);
this._emit(type + "start", ev);
}
// 触发事件
;
_proto._emit = function _emit(type, ev) {
var _el$ownerDocument,
_el$document,
_this2 = this;
// 主要是节流处理
this.pushEvent(type, ev);
var el = this.el,
throttleTimer = this.throttleTimer,
emitThrottles = this.emitThrottles;
if (throttleTimer) {
return;
// 是否进行中的事件
}, {
key: "isProcess",
value: function isProcess(eventType) {
return this.processEvent[eventType];
}
// @ts-ignore
var global = ((_el$ownerDocument = el.ownerDocument) === null || _el$ownerDocument === void 0 ? void 0 : _el$ownerDocument.defaultView) || ((_el$document = el.document) === null || _el$document === void 0 ? void 0 : _el$document.defaultView);
this.throttleTimer = global.requestAnimationFrame(function () {
for (var i = 0, len = emitThrottles.length; i < len; i++) {
var _emitThrottles$i = emitThrottles[i],
_type = _emitThrottles$i.type,
_ev = _emitThrottles$i.ev;
_this2.emit(_type, _ev);
// 触发start事件
}, {
key: "emitStart",
value: function emitStart(type, ev) {
if (this.isProcess(type)) {
return;
}
// 清空
_this2.throttleTimer = 0;
_this2.emitThrottles.length = 0;
});
}
// 触发end事件
;
_proto.emitEnd = function emitEnd(ev) {
var _this3 = this;
var processEvent = this.processEvent;
Object.keys(processEvent).forEach(function (type) {
_this3._emit(type + "end", ev);
delete processEvent[type];
});
};
_proto.pushEvent = function pushEvent(type, ev) {
var emitThrottles = this.emitThrottles;
var newEvent = {
type: type,
ev: ev
};
for (var i = 0, len = emitThrottles.length; i < len; i++) {
if (emitThrottles[i].type === type) {
emitThrottles.splice(i, 1, newEvent);
this.enable(type);
this._emit("".concat(type, "start"), ev);
}
// 触发事件
}, {
key: "_emit",
value: function _emit(type, ev) {
var _el$ownerDocument,
_el$document,
_this2 = this;
// 主要是节流处理
this.pushEvent(type, ev);
var el = this.el,
throttleTimer = this.throttleTimer,
emitThrottles = this.emitThrottles;
if (throttleTimer) {
return;
}
// @ts-ignore
var global = ((_el$ownerDocument = el.ownerDocument) === null || _el$ownerDocument === void 0 ? void 0 : _el$ownerDocument.defaultView) || ((_el$document = el.document) === null || _el$document === void 0 ? void 0 : _el$document.defaultView);
this.throttleTimer = global.requestAnimationFrame(function () {
for (var i = 0, len = emitThrottles.length; i < len; i++) {
var _emitThrottles$i = emitThrottles[i],
_type = _emitThrottles$i.type,
_ev = _emitThrottles$i.ev;
_this2.emit(_type, _ev);
}
// 清空
_this2.throttleTimer = 0;
_this2.emitThrottles.length = 0;
});
}
emitThrottles.push(newEvent);
};
_proto.clearPressTimeout = function clearPressTimeout() {
if (this.pressTimeout) {
clearTimeout(this.pressTimeout);
this.pressTimeout = null;
// 触发end事件
}, {
key: "emitEnd",
value: function emitEnd(ev) {
var _this3 = this;
var processEvent = this.processEvent;
Object.keys(processEvent).forEach(function (type) {
_this3._emit("".concat(type, "end"), ev);
delete processEvent[type];
});
}
};
_proto.reset = function reset() {
this.clearPressTimeout();
this.startTime = 0;
this.startDistance = 0;
this.direction = null;
this.eventType = null;
this.prevMoveTime = 0;
this.prevMovePoint = null;
this.lastMoveTime = 0;
this.lastMovePoint = null;
};
}, {
key: "pushEvent",
value: function pushEvent(type, ev) {
var emitThrottles = this.emitThrottles;
var newEvent = {
type: type,
ev: ev
};
for (var i = 0, len = emitThrottles.length; i < len; i++) {
if (emitThrottles[i].type === type) {
emitThrottles.splice(i, 1, newEvent);
return;
}
}
emitThrottles.push(newEvent);
}
}, {
key: "clearPressTimeout",
value: function clearPressTimeout() {
if (this.pressTimeout) {
clearTimeout(this.pressTimeout);
this.pressTimeout = null;
}
}
}, {
key: "reset",
value: function reset() {
this.clearPressTimeout();
this.startTime = 0;
this.startDistance = 0;
this.direction = null;
this.eventType = null;
this.prevMoveTime = 0;
this.prevMovePoint = null;
this.lastMoveTime = 0;
this.lastMovePoint = null;
}
}]);
return Gesture;

@@ -400,0 +530,0 @@ }(EE__default['default']);

@@ -35,2 +35,3 @@ import type { DisplayObject, FederatedPointerEvent, PointLike as Point } from '@antv/g-lite';

private _end;
private _cancel;
private getEventType;

@@ -37,0 +38,0 @@ private enable;

@@ -47,2 +47,3 @@ import type { FederatedEvent } from '../dom/FederatedEvent';

onWheel: (from: FederatedWheelEvent) => Promise<void>;
onPointerCancel: (from: FederatedPointerEvent) => Promise<void>;
dispatchEvent(e: FederatedEvent, type?: string, skipPropagate?: boolean): void;

@@ -49,0 +50,0 @@ propagate(e: FederatedEvent, type?: string): void;

@@ -11,3 +11,3 @@ import type { CanvasConfig } from '@antv/g';

}
export declare const Canvas: React.ForwardRefExoticComponent<Pick<CanvasProps, keyof CanvasProps> & React.RefAttributes<GCanvas>>;
export declare const Canvas: React.ForwardRefExoticComponent<Omit<CanvasProps, "ref"> & React.RefAttributes<GCanvas>>;
//# sourceMappingURL=canvas.d.ts.map
{
"name": "@antv/g-gesture",
"version": "0.0.73",
"version": "0.0.74",
"description": "G Gesture",

@@ -43,3 +43,3 @@ "keywords": [

},
"gitHead": "b2e4714cc7ef7b72b6de2fe6965e0b913b05acf0"
"gitHead": "92a3aa0f5406a084143327f4f73fb00f2fd74dce"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc