New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@antv/l7-core

Package Overview
Dependencies
Maintainers
23
Versions
540
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/l7-core - npm Package Compare versions

Comparing version 2.0.11 to 2.0.12

3

es/services/interaction/InteractionService.d.ts

@@ -11,2 +11,5 @@ import EventEmitter from 'eventemitter3';

private hammertime;
private lastClickTime;
private lastClickXY;
private clickTimer;
init(): void;

@@ -13,0 +16,0 @@ destroy(): void;

@@ -39,2 +39,5 @@ import _initializerDefineProperty from "@babel/runtime/helpers/initializerDefineProperty";

_this.hammertime = void 0;
_this.lastClickTime = 0;
_this.lastClickXY = [-1, -1];
_this.clickTimer = void 0;

@@ -59,2 +62,39 @@ _this.onHover = function (_ref) {

if (type === 'click') {
var nowTime = new Date().getTime();
if (nowTime - _this.lastClickTime < 500 && Math.abs(_this.lastClickXY[0] - x) < 10 && Math.abs(_this.lastClickXY[1] - y) < 10) {
_this.lastClickTime = 0;
_this.lastClickXY = [-1, -1];
if (_this.clickTimer) {
clearTimeout(_this.clickTimer);
}
type = 'dblclick';
_this.emit(InteractionEvent.Hover, {
x: x,
y: y,
lngLat: lngLat,
type: type
});
} else {
_this.lastClickTime = nowTime;
_this.lastClickXY = [x, y];
_this.clickTimer = setTimeout(function () {
type = 'click';
_this.emit(InteractionEvent.Hover, {
x: x,
y: y,
lngLat: lngLat,
type: type
});
}, 500);
}
return;
}
_this.emit(InteractionEvent.Hover, {

@@ -127,3 +167,2 @@ x: x,

$containter.addEventListener('mouseup', this.onHover);
$containter.addEventListener('dblclick', this.onHover);
$containter.addEventListener('contextmenu', this.onHover);

@@ -144,3 +183,2 @@ this.hammertime = hammertime;

$containter.removeEventListener('mouseup', this.onHover);
$containter.removeEventListener('dblclick', this.onHover);
$containter.removeEventListener('contextmenu', this.onHover);

@@ -147,0 +185,0 @@ }

@@ -58,2 +58,5 @@ "use strict";

_this.hammertime = void 0;
_this.lastClickTime = 0;
_this.lastClickXY = [-1, -1];
_this.clickTimer = void 0;

@@ -78,2 +81,39 @@ _this.onHover = function (_ref) {

if (type === 'click') {
var nowTime = new Date().getTime();
if (nowTime - _this.lastClickTime < 500 && Math.abs(_this.lastClickXY[0] - x) < 10 && Math.abs(_this.lastClickXY[1] - y) < 10) {
_this.lastClickTime = 0;
_this.lastClickXY = [-1, -1];
if (_this.clickTimer) {
clearTimeout(_this.clickTimer);
}
type = 'dblclick';
_this.emit(_IInteractionService.InteractionEvent.Hover, {
x: x,
y: y,
lngLat: lngLat,
type: type
});
} else {
_this.lastClickTime = nowTime;
_this.lastClickXY = [x, y];
_this.clickTimer = setTimeout(function () {
type = 'click';
_this.emit(_IInteractionService.InteractionEvent.Hover, {
x: x,
y: y,
lngLat: lngLat,
type: type
});
}, 500);
}
return;
}
_this.emit(_IInteractionService.InteractionEvent.Hover, {

@@ -146,3 +186,2 @@ x: x,

$containter.addEventListener('mouseup', this.onHover);
$containter.addEventListener('dblclick', this.onHover);
$containter.addEventListener('contextmenu', this.onHover);

@@ -163,3 +202,2 @@ this.hammertime = hammertime;

$containter.removeEventListener('mouseup', this.onHover);
$containter.removeEventListener('dblclick', this.onHover);
$containter.removeEventListener('contextmenu', this.onHover);

@@ -166,0 +204,0 @@ }

6

package.json
{
"name": "@antv/l7-core",
"version": "2.0.11",
"version": "2.0.12",
"description": "",

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

"dependencies": {
"@antv/l7-utils": "^2.0.11",
"@antv/l7-utils": "^2.0.12",
"@babel/runtime": "^7.7.7",

@@ -50,3 +50,3 @@ "@mapbox/tiny-sdf": "^1.1.1",

},
"gitHead": "6579611559625a33bf991dc13f42d79fdc9aba76",
"gitHead": "7073793d181e464ef2ea65c361c025e2448f1cd9",
"publishConfig": {

@@ -53,0 +53,0 @@ "access": "public"

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