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

@antv/l7-component

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-component - npm Package Compare versions

Comparing version 2.0.10 to 2.0.11

9

es/control/BaseControl.d.ts

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

import { IControlService, ILayerService, IMapService, IRendererService } from '@antv/l7-core';
import { IControlOption, IControlService, ILayerService, IMapService, IRendererService, PositionName } from '@antv/l7-core';
import { EventEmitter } from 'eventemitter3';

@@ -10,10 +10,6 @@ import { Container } from 'inversify';

}
export declare type PositionName = 'topright' | 'topleft' | 'bottomright' | 'bottomleft';
export interface IControlOption {
position: PositionName;
[key: string]: any;
}
export default class Control extends EventEmitter {
controlOption: IControlOption;
protected container: HTMLElement;
protected sceneContainer: Container;
protected mapsService: IMapService;

@@ -27,2 +23,3 @@ protected renderService: IRendererService;

position: PositionType;
name: string;
};

@@ -29,0 +26,0 @@ setPosition(position: PositionName): this;

@@ -24,2 +24,4 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";

var controlId = 0;
var Control = function (_EventEmitter) {

@@ -36,2 +38,3 @@ _inherits(Control, _EventEmitter);

_this.container = void 0;
_this.sceneContainer = void 0;
_this.mapsService = void 0;

@@ -50,3 +53,4 @@ _this.renderService = void 0;

return {
position: PositionType.TOPRIGHT
position: PositionType.TOPRIGHT,
name: "".concat(controlId++)
};

@@ -57,2 +61,14 @@ }

value: function setPosition(position) {
var controlService = this.controlService;
if (controlService) {
controlService.removeControl(this);
}
this.controlOption.position = position;
if (controlService) {
controlService.addControl(this, this.sceneContainer);
}
return this;

@@ -67,2 +83,3 @@ }

this.controlService = sceneContainer.get(TYPES.IControlService);
this.sceneContainer = sceneContainer;
this.isShow = true;

@@ -69,0 +86,0 @@ this.container = this.onAdd();

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

import Control, { IControlOption, PositionType } from './BaseControl';
import { IControlOption, PositionType } from '@antv/l7-core';
import Control from './BaseControl';
export interface ILayerControlOption extends IControlOption {

@@ -26,2 +27,3 @@ collapsed: boolean;

sortLayers: boolean;
name: string;
};

@@ -28,0 +30,0 @@ onAdd(): HTMLElement;

@@ -7,4 +7,5 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";

import _inherits from "@babel/runtime/helpers/inherits";
import { PositionType } from '@antv/l7-core';
import { bindAll, DOM } from '@antv/l7-utils';
import Control, { PositionType } from './BaseControl';
import Control from './BaseControl';

@@ -48,3 +49,4 @@ var Layers = function (_Control) {

hideSingleBase: false,
sortLayers: false
sortLayers: false,
name: 'layers'
};

@@ -51,0 +53,0 @@ }

@@ -5,4 +5,5 @@ import Control, { PositionType } from './BaseControl';

position: PositionType;
name: string;
};
onAdd(): HTMLElement;
}

@@ -22,3 +22,4 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";

return {
position: PositionType.BOTTOMLEFT
position: PositionType.BOTTOMLEFT,
name: 'logo'
};

@@ -25,0 +26,0 @@ }

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

import Control, { IControlOption, PositionType } from './BaseControl';
import { IControlOption } from '@antv/l7-core';
import Control, { PositionType } from './BaseControl';
export interface IScaleControlOption extends IControlOption {

@@ -18,2 +19,3 @@ maxWidth: number;

imperial: boolean;
name: string;
};

@@ -20,0 +22,0 @@ onAdd(): HTMLElement;

@@ -33,3 +33,4 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";

updateWhenIdle: false,
imperial: false
imperial: false,
name: 'scale'
};

@@ -36,0 +37,0 @@ }

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

import Control, { IControlOption, PositionType } from './BaseControl';
import { IControlOption } from '@antv/l7-core';
import Control, { PositionType } from './BaseControl';
export interface IZoomControlOption extends IControlOption {

@@ -19,2 +20,3 @@ zoomInText: string;

zoomOutTitle: string;
name: string;
};

@@ -21,0 +23,0 @@ onAdd(): HTMLElement;

@@ -34,3 +34,4 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";

zoomOutText: '−',
zoomOutTitle: 'Zoom out'
zoomOutTitle: 'Zoom out',
name: 'zoom'
};

@@ -37,0 +38,0 @@ }

@@ -6,3 +6,3 @@ import { IMarker } from '@antv/l7-core';

interface IMarkerStyleOption {
element: CallBack;
element?: CallBack;
style: {

@@ -42,3 +42,2 @@ [key: string]: any;

className: string;
element: (feature: any) => HTMLElement;
};

@@ -45,0 +44,0 @@ };

@@ -56,4 +56,3 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";

style: {},
className: '',
element: this.generateElement
className: ''
}

@@ -204,3 +203,3 @@ };

var marker = feature.properties && feature.properties.hasOwnProperty('point_count') ? _this3.clusterMarker(feature) : _this3.normalMarker(feature);
var marker = _this3.clusterMarker(feature);

@@ -229,3 +228,4 @@ _this3.clusterMarkers.push(marker);

var _ref2 = clusterOption,
element = _ref2.element;
_ref2$element = _ref2.element,
element = _ref2$element === void 0 ? this.generateElement.bind(this) : _ref2$element;
var marker = new Marker({

@@ -243,6 +243,3 @@ element: element(feature)

var marker_id = feature.properties.marker_id;
return marker_id ? new Marker().setLnglat({
lng: feature.geometry.coordinates[0],
lat: feature.geometry.coordinates[1]
}) : this.markers[marker_id];
return this.markers[marker_id];
}

@@ -265,3 +262,8 @@ }, {

var span = DOM.create('span', '', label);
span.textContent = feature.properties.point_count;
var _this$markerLayerOpti2 = this.markerLayerOption.clusterOption,
field = _this$markerLayerOpti2.field,
method = _this$markerLayerOpti2.method;
feature.properties.point_count = feature.properties.point_count || 1;
var text = field && method ? feature.properties['point_' + method] || feature.properties[field] : feature.properties.point_count;
span.textContent = text;
return el;

@@ -268,0 +270,0 @@ }

@@ -42,2 +42,4 @@ "use strict";

var controlId = 0;
var Control = function (_EventEmitter) {

@@ -53,2 +55,3 @@ (0, _inherits2.default)(Control, _EventEmitter);

_this.container = void 0;
_this.sceneContainer = void 0;
_this.mapsService = void 0;

@@ -67,3 +70,4 @@ _this.renderService = void 0;

return {
position: PositionType.TOPRIGHT
position: PositionType.TOPRIGHT,
name: "".concat(controlId++)
};

@@ -74,2 +78,14 @@ }

value: function setPosition(position) {
var controlService = this.controlService;
if (controlService) {
controlService.removeControl(this);
}
this.controlOption.position = position;
if (controlService) {
controlService.addControl(this, this.sceneContainer);
}
return this;

@@ -84,2 +100,3 @@ }

this.controlService = sceneContainer.get(_l7Core.TYPES.IControlService);
this.sceneContainer = sceneContainer;
this.isShow = true;

@@ -86,0 +103,0 @@ this.container = this.onAdd();

"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

@@ -24,5 +22,7 @@

var _l7Core = require("@antv/l7-core");
var _l7Utils = require("@antv/l7-utils");
var _BaseControl = _interopRequireWildcard(require("./BaseControl"));
var _BaseControl = _interopRequireDefault(require("./BaseControl"));

@@ -62,6 +62,7 @@ var Layers = function (_Control) {

collapsed: true,
position: _BaseControl.PositionType.TOPRIGHT,
position: _l7Core.PositionType.TOPRIGHT,
autoZIndex: true,
hideSingleBase: false,
sortLayers: false
sortLayers: false,
name: 'layers'
};

@@ -68,0 +69,0 @@ }

@@ -38,3 +38,4 @@ "use strict";

return {
position: _BaseControl.PositionType.BOTTOMLEFT
position: _BaseControl.PositionType.BOTTOMLEFT,
name: 'logo'
};

@@ -41,0 +42,0 @@ }

@@ -50,3 +50,4 @@ "use strict";

updateWhenIdle: false,
imperial: false
imperial: false,
name: 'scale'
};

@@ -53,0 +54,0 @@ }

@@ -51,3 +51,4 @@ "use strict";

zoomOutText: '−',
zoomOutTitle: 'Zoom out'
zoomOutTitle: 'Zoom out',
name: 'zoom'
};

@@ -54,0 +55,0 @@ }

@@ -75,4 +75,3 @@ "use strict";

style: {},
className: '',
element: this.generateElement
className: ''
}

@@ -225,3 +224,3 @@ };

var marker = feature.properties && feature.properties.hasOwnProperty('point_count') ? _this3.clusterMarker(feature) : _this3.normalMarker(feature);
var marker = _this3.clusterMarker(feature);

@@ -250,3 +249,4 @@ _this3.clusterMarkers.push(marker);

var _ref2 = clusterOption,
element = _ref2.element;
_ref2$element = _ref2.element,
element = _ref2$element === void 0 ? this.generateElement.bind(this) : _ref2$element;
var marker = new _marker.default({

@@ -264,6 +264,3 @@ element: element(feature)

var marker_id = feature.properties.marker_id;
return marker_id ? new _marker.default().setLnglat({
lng: feature.geometry.coordinates[0],
lat: feature.geometry.coordinates[1]
}) : this.markers[marker_id];
return this.markers[marker_id];
}

@@ -289,3 +286,8 @@ }, {

span.textContent = feature.properties.point_count;
var _this$markerLayerOpti2 = this.markerLayerOption.clusterOption,
field = _this$markerLayerOpti2.field,
method = _this$markerLayerOpti2.method;
feature.properties.point_count = feature.properties.point_count || 1;
var text = field && method ? feature.properties['point_' + method] || feature.properties[field] : feature.properties.point_count;
span.textContent = text;
return el;

@@ -292,0 +294,0 @@ }

{
"name": "@antv/l7-component",
"version": "2.0.10",
"version": "2.0.11",
"description": "",

@@ -27,4 +27,4 @@ "main": "lib/index.js",

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

@@ -35,3 +35,3 @@ "eventemitter3": "^4.0.0",

},
"gitHead": "1ca88167e1decb83b6ac8b5ccd6756ff13ed7491",
"gitHead": "6579611559625a33bf991dc13f42d79fdc9aba76",
"publishConfig": {

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

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

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