@provoly/dashboard 0.24.10 → 0.24.11

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.
@@ -2055,7 +2055,7 @@ class WidgetMapComponent extends DataWidgetComponent {
2055
2055
  const order = this.optionsCopy.layers.some((layer) => layer.order)
2056
2056
  ? Math.max(...this.optionsCopy.layers.map((layer) => layer.order ?? 0)) + 1
2057
2057
  : this.optionsCopy.layers.length + 1;
2058
- this.optionsCopy.layers.unshift({
2058
+ this.optionsCopy.layers.push({
2059
2059
  attribute: '',
2060
2060
  group: group.name,
2061
2061
  title,
@@ -2454,10 +2454,10 @@ class WidgetMapComponent extends DataWidgetComponent {
2454
2454
  const toIndex = this.optionsCopy.layers.findIndex((layer) => layer.title === groupLayers[targetIdxInGroup].title);
2455
2455
  let newOrder = toIndex;
2456
2456
  if (toIndex === 0) {
2457
- newOrder = (this.optionsCopy.layers[toIndex].order ?? toIndex) + 1;
2457
+ newOrder = (this.optionsCopy.layers[toIndex].order ?? toIndex) / 2;
2458
2458
  }
2459
2459
  else if (toIndex === this.optionsCopy.layers.length - 1) {
2460
- newOrder = (this.optionsCopy.layers[toIndex].order ?? toIndex) / 2;
2460
+ newOrder = (this.optionsCopy.layers[toIndex].order ?? toIndex) + 1;
2461
2461
  }
2462
2462
  else {
2463
2463
  if (direction > 0) {