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.17 to 0.0.1-beta.18

3

esm/events.d.ts

@@ -12,5 +12,2 @@ import { Event as GraphEvent } from '@antv/g-base';

private panstartTimeStamp;
private defaultScale;
private currentScale;
private initScale;
constructor(cfg: any);

@@ -17,0 +14,0 @@ _initEvent(): void;

@@ -55,6 +55,2 @@ import Hammer, { TouchInput } from 'g6-hammerjs';

this.panstartPoint = null;
// 基础的缩放比例
this.defaultScale = 1;
this.currentScale = 1;
this.initScale = 1;
// 统一处理所有的回调

@@ -105,14 +101,8 @@ this.handleEvent = function (ev) {

this.hammerRuntime.on('pinchstart pinchmove pinchend', function (e) {
if (e.type == 'pinchstart') {
_this.initScale = _this.currentScale || 1;
}
if (e.type === 'pinchend') {
e.scale = _this.currentScale;
_this._emitMobileEvent(e.type, e);
return;
}
_this.currentScale = _this.initScale * e.scale;
e.scale = _this.currentScale;
e.srcEvent.extra = {
scale: _this.currentScale,
scale: e.scale,
};

@@ -119,0 +109,0 @@ _this._emitMobileEvent(e.type, e);

@@ -12,5 +12,2 @@ import { Event as GraphEvent } from '@antv/g-base';

private panstartTimeStamp;
private defaultScale;
private currentScale;
private initScale;
constructor(cfg: any);

@@ -17,0 +14,0 @@ _initEvent(): void;

@@ -57,6 +57,2 @@ "use strict";

this.panstartPoint = null;
// 基础的缩放比例
this.defaultScale = 1;
this.currentScale = 1;
this.initScale = 1;
// 统一处理所有的回调

@@ -107,14 +103,8 @@ this.handleEvent = function (ev) {

this.hammerRuntime.on('pinchstart pinchmove pinchend', function (e) {
if (e.type == 'pinchstart') {
_this.initScale = _this.currentScale || 1;
}
if (e.type === 'pinchend') {
e.scale = _this.currentScale;
_this._emitMobileEvent(e.type, e);
return;
}
_this.currentScale = _this.initScale * e.scale;
e.scale = _this.currentScale;
e.srcEvent.extra = {
scale: _this.currentScale,
scale: e.scale,
};

@@ -121,0 +111,0 @@ _this._emitMobileEvent(e.type, e);

2

package.json
{
"name": "@antv/g-mobile",
"version": "0.0.1-beta.17",
"version": "0.0.1-beta.18",
"description": "A mobile canvas library which providing 2d",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -66,6 +66,2 @@ import Hammer, { TouchInput } from 'g6-hammerjs';

private panstartTimeStamp;
// 基础的缩放比例
private defaultScale: number = 1;
private currentScale: number = 1;
private initScale: number = 1;

@@ -127,8 +123,3 @@ constructor(cfg) {

this.hammerRuntime.on('pinchstart pinchmove pinchend', (e) => {
if (e.type == 'pinchstart') {
this.initScale = this.currentScale || 1;
}
if (e.type === 'pinchend') {
e.scale = this.currentScale;
this._emitMobileEvent(e.type, e);

@@ -138,8 +129,4 @@ return;

this.currentScale = this.initScale * e.scale;
e.scale = this.currentScale;
e.srcEvent.extra = {
scale: this.currentScale,
scale: e.scale,
};

@@ -146,0 +133,0 @@ this._emitMobileEvent(e.type, e);

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