Socket
Socket
Sign inDemoInstall

@uiw/react-amap-circle

Package Overview
Dependencies
8
Maintainers
2
Versions
95
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.0 to 6.0.1

14

cjs/useCircle.js

@@ -25,3 +25,3 @@ "use strict";

setCircle = _useState2[1];
(0, _react.useEffect)(function () {
(0, _react.useLayoutEffect)(function () {
if (AMap && map && !circle) {

@@ -31,11 +31,7 @@ var instance = new AMap.Circle((0, _objectSpread2["default"])({}, other));

setCircle(instance);
return function () {
map && map.remove(instance);
setCircle(undefined);
};
}
return function () {
setCircle(function (circle) {
if (circle) {
map && map.remove(circle);
}
return undefined;
});
};
}, [map]);

@@ -42,0 +38,0 @@ (0, _reactAmapUtils.useVisiable)(circle, visiable);

import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["visiable"];
import { useState, useEffect } from 'react';
import { useState, useLayoutEffect } from 'react';
import { useVisiable, useEventProperties, useSettingProperties } from '@uiw/react-amap-utils';

@@ -19,3 +19,3 @@ import { useMapContext } from '@uiw/react-amap-map';

var [circle, setCircle] = useState();
useEffect(() => {
useLayoutEffect(() => {
if (AMap && map && !circle) {

@@ -25,11 +25,7 @@ var instance = new AMap.Circle(_extends({}, other));

setCircle(instance);
return () => {
map && map.remove(instance);
setCircle(undefined);
};
}
return () => {
setCircle(circle => {
if (circle) {
map && map.remove(circle);
}
return undefined;
});
};
}, [map]);

@@ -36,0 +32,0 @@ useVisiable(circle, visiable);

{
"name": "@uiw/react-amap-circle",
"version": "6.0.0",
"version": "6.0.1",
"description": "构造圆形对象,通过 CircleOptions 指定多边形样式",

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

"dependencies": {
"@uiw/react-amap-map": "6.0.0",
"@uiw/react-amap-types": "6.0.0",
"@uiw/react-amap-utils": "6.0.0"
"@uiw/react-amap-map": "6.0.1",
"@uiw/react-amap-types": "6.0.1",
"@uiw/react-amap-utils": "6.0.1"
},

@@ -43,0 +43,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc