提交 e73b4b9e 编写于 作者: Q qiang

fix: map -> marker -> callout style

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