@uiw/react-amap-circle-marker
Advanced tools
Comparing version 7.0.2 to 7.1.0
@@ -5,5 +5,7 @@ import React from 'react'; | ||
export interface CircleMarkerProps extends OverlayProps, AMap.CircleMarkerEvents, AMap.CircleMarkerOptions { | ||
/** @deprecated use `visible` */ | ||
visiable?: boolean; | ||
/** 覆盖物是否可见 */ | ||
visiable?: boolean; | ||
visible?: boolean; | ||
} | ||
export declare const CircleMarker: React.ForwardRefExoticComponent<CircleMarkerProps & React.RefAttributes<CircleMarkerProps>>; |
@@ -14,6 +14,7 @@ "use strict"; | ||
var _reactAmapMap = require("@uiw/react-amap-map"); | ||
var _excluded = ["visiable"]; | ||
var _excluded = ["visiable", "visible"]; | ||
var useCircleMarker = exports.useCircleMarker = function useCircleMarker() { | ||
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var visiable = props.visiable, | ||
visible = props.visible, | ||
other = (0, _objectWithoutProperties2["default"])(props, _excluded); | ||
@@ -45,3 +46,3 @@ var _useMapContext = (0, _reactAmapMap.useMapContext)(), | ||
}, [map]); | ||
(0, _reactAmapUtils.useVisiable)(circleMarker, visiable); | ||
(0, _reactAmapUtils.useVisiable)(circleMarker, visible !== null && visible !== void 0 ? visible : visiable); | ||
(0, _reactAmapUtils.useSettingProperties)(circleMarker, props, ['Center', 'Raius', 'zIndex', 'Bubble', 'Cursor', 'StrokeColor', 'StrokeOpacity', 'StrokeWeight', 'FillColor', 'FillOpacity', 'Draggable', 'ExtData']); | ||
@@ -48,0 +49,0 @@ (0, _reactAmapUtils.useEventProperties)(circleMarker, props, ['onHide', 'onShow', 'onMouseover', 'onTouchend', 'onClick', 'onTouchmove', 'onRightclick', 'onMouseup', 'onMouseout', 'onTouchstart', 'onMousedown', 'onDblclick']); |
@@ -5,5 +5,7 @@ import React from 'react'; | ||
export interface CircleMarkerProps extends OverlayProps, AMap.CircleMarkerEvents, AMap.CircleMarkerOptions { | ||
/** @deprecated use `visible` */ | ||
visiable?: boolean; | ||
/** 覆盖物是否可见 */ | ||
visiable?: boolean; | ||
visible?: boolean; | ||
} | ||
export declare const CircleMarker: React.ForwardRefExoticComponent<CircleMarkerProps & React.RefAttributes<CircleMarkerProps>>; |
import _extends from "@babel/runtime/helpers/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose"; | ||
var _excluded = ["visiable"]; | ||
var _excluded = ["visiable", "visible"]; | ||
import { useState, useEffect } from 'react'; | ||
@@ -12,3 +12,4 @@ import { useVisiable, useEventProperties, useSettingProperties } from '@uiw/react-amap-utils'; | ||
var { | ||
visiable | ||
visiable, | ||
visible | ||
} = props, | ||
@@ -39,3 +40,3 @@ other = _objectWithoutPropertiesLoose(props, _excluded); | ||
}, [map]); | ||
useVisiable(circleMarker, visiable); | ||
useVisiable(circleMarker, visible != null ? visible : visiable); | ||
useSettingProperties(circleMarker, props, ['Center', 'Raius', 'zIndex', 'Bubble', 'Cursor', 'StrokeColor', 'StrokeOpacity', 'StrokeWeight', 'FillColor', 'FillOpacity', 'Draggable', 'ExtData']); | ||
@@ -42,0 +43,0 @@ useEventProperties(circleMarker, props, ['onHide', 'onShow', 'onMouseover', 'onTouchend', 'onClick', 'onTouchmove', 'onRightclick', 'onMouseup', 'onMouseout', 'onTouchstart', 'onMousedown', 'onDblclick']); |
{ | ||
"name": "@uiw/react-amap-circle-marker", | ||
"version": "7.0.2", | ||
"version": "7.1.0", | ||
"description": "构造一个圆形覆盖物。可直接满足创建圆形标注的需要。", | ||
@@ -38,6 +38,6 @@ "funding": "https://jaywcjlove.github.io/#/sponsor", | ||
"dependencies": { | ||
"@uiw/react-amap-map": "7.0.2", | ||
"@uiw/react-amap-types": "7.0.2", | ||
"@uiw/react-amap-utils": "7.0.2" | ||
"@uiw/react-amap-map": "7.1.0", | ||
"@uiw/react-amap-types": "7.1.0", | ||
"@uiw/react-amap-utils": "7.1.0" | ||
} | ||
} |
@@ -36,3 +36,3 @@ CircleMarker 圆点标记 | ||
center={new AMap.LngLat(116.407394, 39.904211)} | ||
visiable={show} | ||
visible={show} | ||
radius={10+Math.random()*10} | ||
@@ -51,3 +51,3 @@ strokeColor="#fff" | ||
center={new AMap.LngLat(113.26641, 23.132324)} | ||
visiable={show} | ||
visible={show} | ||
radius={10+Math.random()*10} | ||
@@ -66,3 +66,3 @@ strokeColor="#fff" | ||
center={new AMap.LngLat(112.562678, 37.873499)} | ||
visiable={show} | ||
visible={show} | ||
radius={10+Math.random()*10} | ||
@@ -81,3 +81,3 @@ strokeColor="#fff" | ||
center={new AMap.LngLat(121.473662, 31.230372)} | ||
visiable={show} | ||
visible={show} | ||
radius={10+Math.random()*10} | ||
@@ -96,3 +96,3 @@ strokeColor="#fff" | ||
center={new AMap.LngLat(117.329949, 31.733806)} | ||
visiable={show} | ||
visible={show} | ||
radius={10+Math.random()*10} | ||
@@ -130,3 +130,3 @@ strokeColor="#fff" | ||
|--------- |-------- |--------- |-------- | | ||
| visiable | 覆盖物是否可见。 | `boolean` | - | | ||
| visible | 覆盖物是否可见。 | `boolean` | - | | ||
| center | 圆心位置 | `LngLat` | - | | ||
@@ -133,0 +133,0 @@ | radius | 圆半径,单位:px 最大值64 | `number` | - | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
17445
254
+ Added@uiw/react-amap-map@7.1.0(transitive)
+ Added@uiw/react-amap-types@7.1.0(transitive)
+ Added@uiw/react-amap-utils@7.1.0(transitive)
- Removed@uiw/react-amap-map@7.0.2(transitive)
- Removed@uiw/react-amap-types@7.0.2(transitive)
- Removed@uiw/react-amap-utils@7.0.2(transitive)
Updated@uiw/react-amap-map@7.1.0
Updated@uiw/react-amap-types@7.1.0
Updated@uiw/react-amap-utils@7.1.0