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

@uiw/react-amap-polygon

Package Overview
Dependencies
Maintainers
0
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-amap-polygon - npm Package Compare versions

Comparing version 7.0.2 to 7.1.0

4

cjs/index.d.ts

@@ -5,6 +5,8 @@ import { OverlayProps } from '@uiw/react-amap-map';

export interface PolygonProps extends OverlayProps, AMap.PolygonEvents, AMap.PolygonOptions {
/** @deprecated use `visible` */
visiable?: boolean;
/** 覆盖物是否可见 */
visiable?: boolean;
visible?: boolean;
children?: JSX.Element;
}
export declare const Polygon: import("react").ForwardRefExoticComponent<PolygonProps & import("react").RefAttributes<PolygonProps>>;

@@ -14,6 +14,7 @@ "use strict";

var _reactAmapMap = require("@uiw/react-amap-map");
var _excluded = ["visiable"];
var _excluded = ["visiable", "visible"];
var usePolygon = exports.usePolygon = function usePolygon() {
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var visiable = props.visiable,
visible = props.visible,
other = (0, _objectWithoutProperties2["default"])(props, _excluded);

@@ -53,3 +54,3 @@ var _useMapContext = (0, _reactAmapMap.useMapContext)(),

}, [polygon, other]);
(0, _reactAmapUtils.useVisiable)(polygon, visiable);
(0, _reactAmapUtils.useVisiable)(polygon, visible !== null && visible !== void 0 ? visible : visiable);
(0, _reactAmapUtils.useSettingProperties)(polygon, props, ['Path', 'Options', 'Map', 'ExtData', 'Draggable']);

@@ -56,0 +57,0 @@ (0, _reactAmapUtils.useEventProperties)(polygon, props, ['onClick', 'onDblClick', 'onRightClick', 'onHide', 'onShow', 'onMouseDown', 'onMouseUp', 'onMouseOver', 'onMouseOut', 'onChange', 'onDragStart', 'onDragging', 'onDragEnd', 'onTouchStart', 'onTouchMove', 'onTouchEnd']);

@@ -5,6 +5,8 @@ import { OverlayProps } from '@uiw/react-amap-map';

export interface PolygonProps extends OverlayProps, AMap.PolygonEvents, AMap.PolygonOptions {
/** @deprecated use `visible` */
visiable?: boolean;
/** 覆盖物是否可见 */
visiable?: boolean;
visible?: boolean;
children?: JSX.Element;
}
export declare const Polygon: import("react").ForwardRefExoticComponent<PolygonProps & import("react").RefAttributes<PolygonProps>>;
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["visiable"];
var _excluded = ["visiable", "visible"];
import { useState, useEffect, useLayoutEffect } from 'react';

@@ -12,3 +12,4 @@ import { useVisiable, useEventProperties, useSettingProperties } from '@uiw/react-amap-utils';

var {
visiable
visiable,
visible
} = props,

@@ -47,3 +48,3 @@ other = _objectWithoutPropertiesLoose(props, _excluded);

}, [polygon, other]);
useVisiable(polygon, visiable);
useVisiable(polygon, visible != null ? visible : visiable);
useSettingProperties(polygon, props, ['Path', 'Options', 'Map', 'ExtData', 'Draggable']);

@@ -50,0 +51,0 @@ useEventProperties(polygon, props, ['onClick', 'onDblClick', 'onRightClick', 'onHide', 'onShow', 'onMouseDown', 'onMouseUp', 'onMouseOver', 'onMouseOut', 'onChange', 'onDragStart', 'onDragging', 'onDragEnd', 'onTouchStart', 'onTouchMove', 'onTouchEnd']);

{
"name": "@uiw/react-amap-polygon",
"version": "7.0.2",
"version": "7.1.0",
"description": "构造多边形对象,通过 PolygonOptions 指定多边形样式。",

@@ -38,5 +38,5 @@ "funding": "https://jaywcjlove.github.io/#/sponsor",

"dependencies": {
"@uiw/react-amap-map": "7.0.2",
"@uiw/react-amap-utils": "7.0.2"
"@uiw/react-amap-map": "7.1.0",
"@uiw/react-amap-utils": "7.1.0"
}
}

@@ -46,3 +46,3 @@ Polygon 多边形

<Polygon
visiable={show}
visible={show}
path={path}

@@ -62,3 +62,3 @@ strokeColor="#FF33FF"

<Polygon
visiable={show}
visible={show}
path={path2}

@@ -159,3 +159,3 @@ strokeColor="#FF33FF"

akey="1"
visiable={show}
visible={show}
strokeOpacity={1}

@@ -168,3 +168,3 @@ path={paths}

zIndex={3}
visiable={true}
visible={true}
strokeColor={"yellow"}

@@ -200,3 +200,3 @@ strokeOpacity={1}

|--------- |-------- |--------- |-------- |
| visiable | 覆盖物是否可见。 | `boolean` | - |
| visible | 覆盖物是否可见。 | `boolean` | - |
| path | 多边形轮廓线的节点坐标数组,当为“环”多边形时(多边形区域在多边形内显示为“岛”),path为二维数组,数组元素为多边形轮廓线的节点坐标数组, “环”多边形时,要求数组第一个元素为外多边形,其余为“岛”多边形,外多边形需包含“岛”多边形,否则程序不作处理 | `Array<LngLat>` / `Array<Array<LngLat>>` | - |

@@ -203,0 +203,0 @@ | options | 多边形属性(样式风格,包括组成多边形轮廓线的节点、轮廓线样式等)。 | `PolygonOptions` | - |

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