提交 e73b4b9e 编写于 作者: Q qiang

fix: map -> marker -> callout style

上级 b8016ef6
...@@ -7826,7 +7826,7 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({ ...@@ -7826,7 +7826,7 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
w = img.width / 2; w = img.width / 2;
h = img.height / 2; h = img.height / 2;
} }
top = h - (h - y); top = h - (h - y * h);
if ("MarkerImage" in maps) { if ("MarkerImage" in maps) {
icon = new maps.MarkerImage(img.src, null, null, new maps.Point(x * w, y * h), new maps.Size(w, h)); icon = new maps.MarkerImage(img.src, null, null, new maps.Point(x * w, y * h), new maps.Size(w, h));
} else { } else {
...@@ -7878,6 +7878,7 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({ ...@@ -7878,6 +7878,7 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
let callout = marker.callout; let callout = marker.callout;
let calloutStyle; let calloutStyle;
if (calloutOpt.content || title) { if (calloutOpt.content || title) {
const boxShadow = "0px 0px 3px 1px rgba(0,0,0,0.5)";
calloutStyle = calloutOpt.content ? { calloutStyle = calloutOpt.content ? {
position, position,
map, map,
...@@ -7888,14 +7889,14 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({ ...@@ -7888,14 +7889,14 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
borderRadius: calloutOpt.borderRadius, borderRadius: calloutOpt.borderRadius,
bgColor: calloutOpt.bgColor, bgColor: calloutOpt.bgColor,
padding: calloutOpt.padding, padding: calloutOpt.padding,
boxShadow: calloutOpt.boxShadow, boxShadow: calloutOpt.boxShadow || boxShadow,
display: calloutOpt.display display: calloutOpt.display
} : { } : {
position, position,
map, map,
top, top,
content: title, content: title,
boxShadow: "0px 0px 3px 1px rgba(0,0,0,0.5)" boxShadow
}; };
if (callout) { if (callout) {
callout.setOption(calloutStyle); callout.setOption(calloutStyle);
......
...@@ -15239,7 +15239,7 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({ ...@@ -15239,7 +15239,7 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
w = img.width / 2; w = img.width / 2;
h = img.height / 2; h = img.height / 2;
} }
top = h - (h - y); top = h - (h - y * h);
if ("MarkerImage" in maps2) { if ("MarkerImage" in maps2) {
icon = new maps2.MarkerImage(img.src, null, null, new maps2.Point(x * w, y * h), new maps2.Size(w, h)); icon = new maps2.MarkerImage(img.src, null, null, new maps2.Point(x * w, y * h), new maps2.Size(w, h));
} else { } else {
...@@ -15291,6 +15291,7 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({ ...@@ -15291,6 +15291,7 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
let callout = marker.callout; let callout = marker.callout;
let calloutStyle; let calloutStyle;
if (calloutOpt.content || title) { if (calloutOpt.content || title) {
const boxShadow = "0px 0px 3px 1px rgba(0,0,0,0.5)";
calloutStyle = calloutOpt.content ? { calloutStyle = calloutOpt.content ? {
position, position,
map, map,
...@@ -15301,14 +15302,14 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({ ...@@ -15301,14 +15302,14 @@ var MapMarker = /* @__PURE__ */ defineSystemComponent({
borderRadius: calloutOpt.borderRadius, borderRadius: calloutOpt.borderRadius,
bgColor: calloutOpt.bgColor, bgColor: calloutOpt.bgColor,
padding: calloutOpt.padding, padding: calloutOpt.padding,
boxShadow: calloutOpt.boxShadow, boxShadow: calloutOpt.boxShadow || boxShadow,
display: calloutOpt.display display: calloutOpt.display
} : { } : {
position, position,
map, map,
top, top,
content: title, content: title,
boxShadow: "0px 0px 3px 1px rgba(0,0,0,0.5)" boxShadow
}; };
if (callout) { if (callout) {
callout.setOption(calloutStyle); callout.setOption(calloutStyle);
......
...@@ -153,7 +153,7 @@ export default /*#__PURE__*/ defineSystemComponent({ ...@@ -153,7 +153,7 @@ export default /*#__PURE__*/ defineSystemComponent({
w = img.width / 2 w = img.width / 2
h = img.height / 2 h = img.height / 2
} }
top = h - (h - y) top = h - (h - y * h)
if ('MarkerImage' in maps) { if ('MarkerImage' in maps) {
icon = new maps.MarkerImage( icon = new maps.MarkerImage(
img.src, img.src,
...@@ -211,6 +211,7 @@ export default /*#__PURE__*/ defineSystemComponent({ ...@@ -211,6 +211,7 @@ export default /*#__PURE__*/ defineSystemComponent({
let callout = marker.callout let callout = marker.callout
let calloutStyle: CalloutOptions let calloutStyle: CalloutOptions
if (calloutOpt.content || title) { if (calloutOpt.content || title) {
const boxShadow = '0px 0px 3px 1px rgba(0,0,0,0.5)'
calloutStyle = calloutOpt.content calloutStyle = calloutOpt.content
? { ? {
position, position,
...@@ -222,7 +223,7 @@ export default /*#__PURE__*/ defineSystemComponent({ ...@@ -222,7 +223,7 @@ export default /*#__PURE__*/ defineSystemComponent({
borderRadius: calloutOpt.borderRadius, borderRadius: calloutOpt.borderRadius,
bgColor: calloutOpt.bgColor, bgColor: calloutOpt.bgColor,
padding: calloutOpt.padding, padding: calloutOpt.padding,
boxShadow: calloutOpt.boxShadow, boxShadow: calloutOpt.boxShadow || boxShadow,
display: calloutOpt.display, display: calloutOpt.display,
} }
: { : {
...@@ -230,7 +231,7 @@ export default /*#__PURE__*/ defineSystemComponent({ ...@@ -230,7 +231,7 @@ export default /*#__PURE__*/ defineSystemComponent({
map, map,
top, top,
content: title, content: title,
boxShadow: '0px 0px 3px 1px rgba(0,0,0,0.5)', boxShadow,
} }
if (callout) { if (callout) {
callout.setOption(calloutStyle) callout.setOption(calloutStyle)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册