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

@uiw/react-amap-marker

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 6.0.0 to 6.0.1

22

cjs/useMarker.js

@@ -29,4 +29,4 @@ "use strict";

Portal = _usePortal.Portal;
(0, _react.useEffect)(function () {
if (!marker && map) {
(0, _react.useLayoutEffect)(function () {
if (map && !marker) {
if (props.children) {

@@ -38,12 +38,12 @@ other.content = container;

setMarker(instance);
return function () {
if (instance) {
// @fix [244] https://github.com/uiwjs/react-amap/issues/244
// typeof marker.remove === 'function' && marker.remove();
instance.setMap(null);
setMarker(undefined);
}
};
}
return function () {
if (marker) {
// @fix [244] https://github.com/uiwjs/react-amap/issues/244
// typeof marker.remove === 'function' && marker.remove();
marker.setMap(null);
setMarker(undefined);
}
};
}, [map, marker]);
}, [map]);
(0, _reactAmapUtils.useVisiable)(marker, visiable);

@@ -50,0 +50,0 @@ (0, _reactAmapUtils.useSettingProperties)(marker, props, ['Path', 'Anchor', 'Offset', 'Animation', 'Clickable', 'Position', 'Angle', 'Label', 'zIndex', 'Icon', 'Draggable', 'Cursor', 'Content', 'Map', 'Title', 'Top', 'Shadow', 'Shape', 'ExtData']);

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

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

} = usePortal();
useEffect(() => {
if (!marker && map) {
useLayoutEffect(() => {
if (map && !marker) {
if (props.children) {

@@ -32,12 +32,12 @@ other.content = container;

setMarker(instance);
return () => {
if (instance) {
// @fix [244] https://github.com/uiwjs/react-amap/issues/244
// typeof marker.remove === 'function' && marker.remove();
instance.setMap(null);
setMarker(undefined);
}
};
}
return () => {
if (marker) {
// @fix [244] https://github.com/uiwjs/react-amap/issues/244
// typeof marker.remove === 'function' && marker.remove();
marker.setMap(null);
setMarker(undefined);
}
};
}, [map, marker]);
}, [map]);
useVisiable(marker, visiable);

@@ -44,0 +44,0 @@ useSettingProperties(marker, props, ['Path', 'Anchor', 'Offset', 'Animation', 'Clickable', 'Position', 'Angle', 'Label', 'zIndex', 'Icon', 'Draggable', 'Cursor', 'Content', 'Map', 'Title', 'Top', 'Shadow', 'Shape', 'ExtData']);

{
"name": "@uiw/react-amap-marker",
"version": "6.0.0",
"version": "6.0.1",
"description": "点标记是用来标示某个位置点信息的一种地图要素,本章介绍如何在地图图面使用点标记。",

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

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

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

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