Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antv/g-mobile

Package Overview
Dependencies
Maintainers
36
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-mobile - npm Package Compare versions

Comparing version 0.0.1-beta.5 to 0.0.1-beta.6

13

esm/events.js

@@ -1,3 +0,2 @@

import Hammer from 'g6-hammerjs';
import { TouchInput } from 'g6-hammerjs';
import Hammer, { TouchInput } from 'g6-hammerjs';
import { Event as GraphEvent } from '@antv/g-base';

@@ -97,6 +96,6 @@ import { isParent } from './util/util';

this.hammerRuntime.on('swipe', function (e) {
_this._emitMobileEvent(e.type, e.srcEvent);
_this._emitMobileEvent(e.type, e);
});
this.hammerRuntime.on('rotatestart rotatemove', function (e) {
_this._emitMobileEvent(e.type, e.srcEvent);
_this._emitMobileEvent(e.type, e);
});

@@ -108,3 +107,3 @@ this.hammerRuntime.on('pinchstart pinchmove pinchend', function (e) {

};
_this._emitMobileEvent(e.type, e.srcEvent);
_this._emitMobileEvent(e.type, e);
if (e.type === 'pinchend') {

@@ -115,6 +114,6 @@ _this.defaultScale = scale;

this.hammerRuntime.on('doubletap', function (e) {
_this._emitMobileEvent(e.type, e.srcEvent);
_this._emitMobileEvent(e.type, e);
});
this.hammerRuntime.on('tap', function (e) {
_this._emitMobileEvent(e.type, e.srcEvent);
_this._emitMobileEvent(e.type, e);
});

@@ -121,0 +120,0 @@ };

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var g6_hammerjs_1 = require("g6-hammerjs");
var g6_hammerjs_2 = require("g6-hammerjs");
var g_base_1 = require("@antv/g-base");

@@ -70,3 +69,3 @@ var util_1 = require("./util/util");

this.hammerRuntime = new g6_hammerjs_1.default({}, {
inputClass: g6_hammerjs_2.TouchInput,
inputClass: g6_hammerjs_1.TouchInput,
});

@@ -100,6 +99,6 @@ this.hammerRuntime.add(new g6_hammerjs_1.default.Pan({ threshold: 0, pointers: 0 }));

this.hammerRuntime.on('swipe', function (e) {
_this._emitMobileEvent(e.type, e.srcEvent);
_this._emitMobileEvent(e.type, e);
});
this.hammerRuntime.on('rotatestart rotatemove', function (e) {
_this._emitMobileEvent(e.type, e.srcEvent);
_this._emitMobileEvent(e.type, e);
});

@@ -111,3 +110,3 @@ this.hammerRuntime.on('pinchstart pinchmove pinchend', function (e) {

};
_this._emitMobileEvent(e.type, e.srcEvent);
_this._emitMobileEvent(e.type, e);
if (e.type === 'pinchend') {

@@ -118,6 +117,6 @@ _this.defaultScale = scale;

this.hammerRuntime.on('doubletap', function (e) {
_this._emitMobileEvent(e.type, e.srcEvent);
_this._emitMobileEvent(e.type, e);
});
this.hammerRuntime.on('tap', function (e) {
_this._emitMobileEvent(e.type, e.srcEvent);
_this._emitMobileEvent(e.type, e);
});

@@ -124,0 +123,0 @@ };

{
"name": "@antv/g-mobile",
"version": "0.0.1-beta.5",
"version": "0.0.1-beta.6",
"description": "A mobile canvas library which providing 2d",

@@ -30,6 +30,3 @@ "main": "lib/index.js",

"keywords": ["util", "antv", "g"],
"publishConfig": {
"cache": "~/.npm",
"access": "public"
},
"author": "https://github.com/orgs/antvis/people",

@@ -60,3 +57,3 @@ "license": "ISC",

"escape-string-regexp": "^4.0.0",
"g6-hammerjs": "^0.0.2",
"g6-hammerjs": "^0.0.5",
"gl-matrix": "^3.0.0",

@@ -63,0 +60,0 @@ "supports-color": "^8.1.0",

@@ -1,3 +0,2 @@

import Hammer from 'g6-hammerjs';
import { TouchInput } from 'g6-hammerjs';
import Hammer, { TouchInput } from 'g6-hammerjs';
import { Event as GraphEvent } from '@antv/g-base';

@@ -84,3 +83,2 @@ import { ICanvas, IShape } from '@antv/g-base';

this.hammerRuntime.add(new Hammer.Pan({ threshold: 0, pointers: 0 }));
this.hammerRuntime.add(new Hammer.Swipe()).recognizeWith(this.hammerRuntime.get('pan'));

@@ -119,7 +117,7 @@ this.hammerRuntime.add(new Hammer.Rotate({ threshold: 0 })).recognizeWith(this.hammerRuntime.get('pan'));

this.hammerRuntime.on('swipe', (e) => {
this._emitMobileEvent(e.type, e.srcEvent);
this._emitMobileEvent(e.type, e);
});
this.hammerRuntime.on('rotatestart rotatemove', (e) => {
this._emitMobileEvent(e.type, e.srcEvent);
this._emitMobileEvent(e.type, e);
});

@@ -132,3 +130,3 @@

};
this._emitMobileEvent(e.type, e.srcEvent);
this._emitMobileEvent(e.type, e);

@@ -141,7 +139,7 @@ if (e.type === 'pinchend') {

this.hammerRuntime.on('doubletap', (e) => {
this._emitMobileEvent(e.type, e.srcEvent);
this._emitMobileEvent(e.type, e);
});
this.hammerRuntime.on('tap', (e) => {
this._emitMobileEvent(e.type, e.srcEvent);
this._emitMobileEvent(e.type, e);
});

@@ -148,0 +146,0 @@ }

Sorry, the diff of this file is too big to display

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