@aibee/crc-bmap 0.0.80 → 0.0.82

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/lib/bmap.esm.js CHANGED
@@ -414,7 +414,7 @@ function darkenColor(hexColor) {
414
414
  let r = parseInt(hexColor.substring(1, 3), 16);
415
415
  let g = parseInt(hexColor.substring(3, 5), 16);
416
416
  let b = parseInt(hexColor.substring(5, 7), 16);
417
- const factor = 0.8;
417
+ const factor = 0.85;
418
418
  r = Math.floor(r * factor);
419
419
  g = Math.floor(g * factor);
420
420
  b = Math.floor(b * factor);
@@ -914,7 +914,8 @@ var defaultOptions3 = {
914
914
  icon_border: { color: "#586EE0", width: 0 },
915
915
  background: "",
916
916
  collision_hide_icon: true,
917
- built_in: false
917
+ built_in: false,
918
+ box_only_icon: false
918
919
  };
919
920
  var Poi = class extends EventDispatcher2 {
920
921
  constructor(context, options) {
@@ -991,11 +992,22 @@ var Poi = class extends EventDispatcher2 {
991
992
  resetSize() {
992
993
  return __async(this, null, function* () {
993
994
  yield sleepOnePromise();
994
- const { width, height } = this.div.getBoundingClientRect();
995
- this.size = {
996
- width: width + 2,
997
- height: height + 2
998
- };
995
+ if (this.options.box_only_icon) {
996
+ if (!this.img) {
997
+ return;
998
+ }
999
+ const { width, height } = this.img.getBoundingClientRect();
1000
+ this.size = {
1001
+ width: width + 2,
1002
+ height: height + 2
1003
+ };
1004
+ } else {
1005
+ const { width, height } = this.div.getBoundingClientRect();
1006
+ this.size = {
1007
+ width: width + 2,
1008
+ height: height + 2
1009
+ };
1010
+ }
999
1011
  });
1000
1012
  }
1001
1013
  renderHelperBox() {