@acorex/components 19.11.13-next.1 → 19.11.13-next.2

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.
@@ -795,11 +795,16 @@ class AXMapComponent {
795
795
  }
796
796
  });
797
797
  this.#centerEffect = effect(() => {
798
- if (this.rendered() && this.latitude() !== null && this.longitude() !== null && this.fitToDraw() === false) {
799
- this.leafletService.setCenter({
800
- latitude: this.latitude(),
801
- longitude: this.longitude(),
802
- });
798
+ if (this.rendered()) {
799
+ if (this.fitToDraw() === false) {
800
+ this.leafletService.setCenter({
801
+ latitude: this.latitude(),
802
+ longitude: this.longitude(),
803
+ });
804
+ }
805
+ else {
806
+ this.fitBoundsToDrawItems();
807
+ }
803
808
  }
804
809
  });
805
810
  }
@@ -898,11 +903,6 @@ class AXMapComponent {
898
903
  }
899
904
  #zoomEffect;
900
905
  #centerEffect;
901
- // #fitDrawEffect = effect(() => {
902
- // if (this.rendered() && this.fitToDraw() && (this.polygons() || this.markers())) {
903
- // this.fitBoundsToDrawItems();
904
- // }
905
- // });
906
906
  /**
907
907
  * @description
908
908
  * Cleanup function that destroys the map when the component is destroyed.