@deepinnet-components/pc 0.0.52 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -50,6 +50,12 @@ var MapPolyline = function MapPolyline(props) {
|
|
|
50
50
|
zIndex = _props$zIndex === void 0 ? 12 : _props$zIndex,
|
|
51
51
|
_props$isArrow = props.isArrow,
|
|
52
52
|
isArrow = _props$isArrow === void 0 ? false : _props$isArrow,
|
|
53
|
+
_props$arrowConfig = props.arrowConfig,
|
|
54
|
+
arrowConfig = _props$arrowConfig === void 0 ? {
|
|
55
|
+
img: 'custom-arrow',
|
|
56
|
+
spacing: 25,
|
|
57
|
+
size: 1
|
|
58
|
+
} : _props$arrowConfig,
|
|
53
59
|
_props$multi = props.multi,
|
|
54
60
|
multi = _props$multi === void 0 ? false : _props$multi,
|
|
55
61
|
_props$isGetColor = props.isGetColor,
|
|
@@ -232,12 +238,12 @@ var MapPolyline = function MapPolyline(props) {
|
|
|
232
238
|
type: 'symbol',
|
|
233
239
|
source: id,
|
|
234
240
|
layout: {
|
|
235
|
-
'icon-image': 'custom-arrow',
|
|
241
|
+
'icon-image': arrowConfig.img || 'custom-arrow',
|
|
236
242
|
// 箭头图标
|
|
237
243
|
'symbol-placement': 'line',
|
|
238
|
-
'symbol-spacing': 25,
|
|
244
|
+
'symbol-spacing': arrowConfig.spacing || 25,
|
|
239
245
|
// 图标间隔,默认为250
|
|
240
|
-
'icon-size': 1
|
|
246
|
+
'icon-size': arrowConfig.size || 1
|
|
241
247
|
},
|
|
242
248
|
metadata: {
|
|
243
249
|
zIndex: zIndex
|
|
@@ -5,10 +5,8 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { Map2D } from "../../..";
|
|
8
|
-
import { Button,
|
|
8
|
+
import { Button, message } from 'antd';
|
|
9
9
|
import React, { useEffect, useState } from 'react';
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
|
|
12
10
|
var Map = Map2D.Map,
|
|
13
11
|
MapMarker = Map2D.MapMarker,
|
|
14
12
|
MapPolygon = Map2D.MapPolygon,
|
|
@@ -165,9 +163,6 @@ var App = function App() {
|
|
|
165
163
|
onClick: function onClick() {
|
|
166
164
|
message.info('centerOfMass中心');
|
|
167
165
|
}
|
|
168
|
-
}))))
|
|
169
|
-
type: "primary",
|
|
170
|
-
onClick: function onClick() {}
|
|
171
|
-
}, "btn")));
|
|
166
|
+
})))));
|
|
172
167
|
};
|
|
173
168
|
export default App;
|