azure-maps-control 3.7.2 → 3.7.4

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/dist/atlas.css CHANGED
@@ -1529,18 +1529,18 @@
1529
1529
  overflow: auto;
1530
1530
  position: absolute;
1531
1531
  }
1532
- .atlas-map .top-left .azure-maps-control-container > .style-options.list,
1533
- .atlas-map .bottom-left .azure-maps-control-container > .style-options.list {
1532
+ .atlas-map .top-left .azure-maps-control-container > .style-options.list:not(.azure-maps-control-dropdown),
1533
+ .atlas-map .bottom-left .azure-maps-control-container > .style-options.list:not(.azure-maps-control-dropdown) {
1534
1534
  left: 100%;
1535
1535
  padding-left: 1px;
1536
1536
  }
1537
- .atlas-map .top-right .azure-maps-control-container > .style-options.list,
1538
- .atlas-map .bottom-right .azure-maps-control-container > .style-options.list {
1537
+ .atlas-map .top-right .azure-maps-control-container > .style-options.list:not(.azure-maps-control-dropdown),
1538
+ .atlas-map .bottom-right .azure-maps-control-container > .style-options.list:not(.azure-maps-control-dropdown) {
1539
1539
  right: 100%;
1540
1540
  padding-right: 1px;
1541
1541
  }
1542
- .atlas-map .bottom-right .azure-maps-control-container > .style-options.list,
1543
- .atlas-map .bottom-left .azure-maps-control-container > .style-options.list {
1542
+ .atlas-map .bottom-right .azure-maps-control-container > .style-options.list:not(.azure-maps-control-dropdown),
1543
+ .atlas-map .bottom-left .azure-maps-control-container > .style-options.list:not(.azure-maps-control-dropdown) {
1544
1544
  bottom: 0px;
1545
1545
  }
1546
1546
  .atlas-map .azure-maps-control-container > .style-options.list button {
package/dist/atlas.js CHANGED
@@ -52309,7 +52309,7 @@ uniform ${precision} ${type} u_${name};
52309
52309
  return UserAgent;
52310
52310
  }());
52311
52311
 
52312
- var version$3 = "3.7.2";
52312
+ var version$3 = "3.7.4";
52313
52313
 
52314
52314
  /**
52315
52315
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -57866,6 +57866,25 @@ uniform ${precision} ${type} u_${name};
57866
57866
  if (expanded) {
57867
57867
  container.classList.add(StyleControl.Css.inUse);
57868
57868
  styleOpsGrid.classList.remove("hidden-accessible-element");
57869
+ // Dynamically cap max-height to fit within the map container
57870
+ if (_this.options.layout === "list") {
57871
+ var mapContainer = _this.map.getMapContainer();
57872
+ var mapRect = mapContainer.getBoundingClientRect();
57873
+ var btnRect = currStyleButton.getBoundingClientRect();
57874
+ var btnOffsetTop = Math.max(0, btnRect.top - mapRect.top);
57875
+ var btnHeight = currStyleButton.offsetHeight ||
57876
+ btnRect.height ||
57877
+ 0;
57878
+ var mapHeight = mapContainer.clientHeight;
57879
+ var padding = 8;
57880
+ var isBottomPosition = (options === null || options === void 0 ? void 0 : options.position) === exports.ControlPosition.BottomLeft ||
57881
+ (options === null || options === void 0 ? void 0 : options.position) === exports.ControlPosition.BottomRight;
57882
+ var availableHeight = isBottomPosition
57883
+ ? Math.max(0, btnOffsetTop - padding) // space above button
57884
+ : Math.max(0, mapHeight - (btnOffsetTop + btnHeight + padding)); // space below button
57885
+ var maxHeight = Math.max(100, Math.floor(availableHeight));
57886
+ styleOpsGrid.style.maxHeight = "".concat(maxHeight, "px");
57887
+ }
57869
57888
  }
57870
57889
  else {
57871
57890
  container.classList.remove(StyleControl.Css.inUse);
@@ -58019,7 +58038,7 @@ uniform ${precision} ${type} u_${name};
58019
58038
  return _this.thumbnailCache.blob.get(response.url);
58020
58039
  }
58021
58040
  else {
58022
- // we need the response.clone() to allow reading over body multiple times since response objects are cached
58041
+ // we need the response.clone() to allow reading over body multiple times since response objects are cached
58023
58042
  // and can be reused across multiple invocations
58024
58043
  var blobPromise = response.clone().blob();
58025
58044
  _this.thumbnailCache.blob.set(response.url, blobPromise);
@@ -58073,7 +58092,7 @@ uniform ${precision} ${type} u_${name};
58073
58092
  };
58074
58093
  StyleControl.prototype.buildCurrStyleBtn = function () {
58075
58094
  var selectCurrButton = document.createElement("button");
58076
- if (this.options.layout == 'icons') {
58095
+ if (this.options.layout === "icons") {
58077
58096
  selectCurrButton.classList.add(StyleControl.Css.button);
58078
58097
  }
58079
58098
  else {
@@ -58092,11 +58111,9 @@ uniform ${precision} ${type} u_${name};
58092
58111
  StyleControl.prototype.buildStyleOpsGrid = function () {
58093
58112
  var _this = this;
58094
58113
  var styleOpsGrid = document.createElement("div");
58095
- styleOpsGrid.classList.add(StyleControl.Css.styleOptions);
58096
- if (this.options.layout === 'icons') {
58097
- styleOpsGrid.classList.add(this.options.layout);
58098
- }
58099
- else {
58114
+ var layoutClass = this.options.layout === "icons" ? "icons" : "list";
58115
+ styleOpsGrid.classList.add(StyleControl.Css.styleOptions, layoutClass);
58116
+ if (layoutClass === "list") {
58100
58117
  styleOpsGrid.classList.add(StyleControl.Css.dropdown);
58101
58118
  }
58102
58119
  styleOpsGrid.setAttribute("aria-label", "Style Options");
@@ -115376,8 +115393,12 @@ uniform ${precision} ${type} u_${name};
115376
115393
  */
115377
115394
  StyleManager.prototype._transformStyleRequest = function (url, params) {
115378
115395
  var _a;
115396
+ var domain = (Url.protoRegEx.test(this.serviceOptions.domain) ?
115397
+ this.serviceOptions.domain.slice(this.serviceOptions.domain.indexOf("\/\/") + 2) :
115398
+ this.serviceOptions.domain)
115399
+ .replace(/\/+$/, "");
115379
115400
  if (url.includes(constants.domainPlaceHolder)) {
115380
- params.url = params.url.replace(constants.domainPlaceHolder, this.serviceOptions.domain);
115401
+ params.url = params.url.replace(constants.domainPlaceHolder, domain);
115381
115402
  }
115382
115403
  if (url.includes(constants.stylePathHolder)) {
115383
115404
  params.url = params.url.replace(constants.stylePathHolder, constants.stylePath);
@@ -115385,7 +115406,7 @@ uniform ${precision} ${type} u_${name};
115385
115406
  if (url.includes(constants.styleResourcePlaceholder)) {
115386
115407
  params.url = params.url.replace(constants.styleResourcePlaceholder, constants.styleResourcePath);
115387
115408
  }
115388
- if (params.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase()) ||
115409
+ if (params.url.toLocaleLowerCase().includes(domain.toLocaleLowerCase()) ||
115389
115410
  params.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase())) {
115390
115411
  // Only add API version param for Azure maps domain requests
115391
115412
  var targetUrl = new URL(params.url);