@aibee/crc-bmap 0.0.71 → 0.0.72
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.
- package/example/src/main.ts +2 -2
- package/lib/bmap.cjs.min.js +1 -1
- package/lib/bmap.cjs.min.js.map +2 -2
- package/lib/bmap.esm.js +15 -5
- package/lib/bmap.esm.js.map +2 -2
- package/lib/bmap.esm.min.js +1 -1
- package/lib/bmap.esm.min.js.map +2 -2
- package/lib/bmap.min.js +1 -1
- package/lib/bmap.min.js.map +2 -2
- package/lib/src/elements/poi.d.ts +2 -0
- package/package.json +1 -1
package/lib/bmap.esm.js
CHANGED
|
@@ -901,7 +901,8 @@ var defaultOptions3 = {
|
|
|
901
901
|
position: { x: 0, y: 0, z: 0 },
|
|
902
902
|
icon_opacity: 1,
|
|
903
903
|
icon_border: { color: "#586EE0", width: 0 },
|
|
904
|
-
background: ""
|
|
904
|
+
background: "",
|
|
905
|
+
collision_hide_icon: true
|
|
905
906
|
};
|
|
906
907
|
var Poi = class extends EventDispatcher2 {
|
|
907
908
|
constructor(context, options) {
|
|
@@ -917,6 +918,7 @@ var Poi = class extends EventDispatcher2 {
|
|
|
917
918
|
__publicField(this, "size", { width: 0, height: 0 });
|
|
918
919
|
__publicField(this, "position", new Vector35());
|
|
919
920
|
__publicField(this, "userData", {});
|
|
921
|
+
__publicField(this, "showTextStatus", true);
|
|
920
922
|
__publicField(this, "_changePosition", () => {
|
|
921
923
|
});
|
|
922
924
|
this.options = proxyOptions(__spreadValues(__spreadValues({}, defaultOptions3), options), this);
|
|
@@ -965,7 +967,6 @@ var Poi = class extends EventDispatcher2 {
|
|
|
965
967
|
this.addEventListener("change-icon_border", ({ value }) => {
|
|
966
968
|
if (this.img) {
|
|
967
969
|
this.img.style.border = `${value.width}px solid ${value.color}`;
|
|
968
|
-
this.resetSize();
|
|
969
970
|
}
|
|
970
971
|
});
|
|
971
972
|
this.addEventListener("change-background", ({ value }) => {
|
|
@@ -1071,11 +1072,20 @@ var Poi = class extends EventDispatcher2 {
|
|
|
1071
1072
|
this.changeOverlayVisible(visible);
|
|
1072
1073
|
}
|
|
1073
1074
|
changeOverlayVisible(visible) {
|
|
1074
|
-
if (visible === this.overlay.visible) {
|
|
1075
|
+
if (visible === this.overlay.visible && this.options.collision_hide_icon) {
|
|
1075
1076
|
return;
|
|
1076
1077
|
}
|
|
1077
|
-
this.
|
|
1078
|
-
|
|
1078
|
+
if (this.options.collision_hide_icon) {
|
|
1079
|
+
this.overlay.visible = visible;
|
|
1080
|
+
this.overlay.div.style.visibility = visible ? "visible" : "hidden";
|
|
1081
|
+
} else {
|
|
1082
|
+
if (this.showTextStatus === visible) {
|
|
1083
|
+
return;
|
|
1084
|
+
}
|
|
1085
|
+
console.log("visible", visible);
|
|
1086
|
+
this.textDiv.style.display = visible ? "block" : "none";
|
|
1087
|
+
this.showTextStatus = visible;
|
|
1088
|
+
}
|
|
1079
1089
|
}
|
|
1080
1090
|
parentSetVisible(visible) {
|
|
1081
1091
|
if (!this.visible) {
|