mudlet-map-renderer 0.42.0-konva → 0.42.1-konva

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/index.mjs CHANGED
@@ -3915,17 +3915,17 @@ var K = "rgb(120, 72, 0)", wt = class {
3915
3915
  if (!this.state.currentAreaInstance || this.state.currentZIndex === void 0) return null;
3916
3916
  let e = this.state.currentAreaInstance.getPlane(this.state.currentZIndex);
3917
3917
  if (!e) return null;
3918
- let t = this.state.getEffectiveBounds(this.state.currentAreaInstance, e), n = this.state.settings.areaName && this.state.currentAreaInstance.getAreaName(), r = {
3919
- minX: n ? t.minX - 4 : t.minX,
3920
- maxX: t.maxX,
3918
+ let t = this.state.getEffectiveBounds(this.state.currentAreaInstance, e), n = this.state.settings.areaName ? this.state.currentAreaInstance.getAreaName() : null, r = n ? t.minX - 3.5 + n.length * 2.5 * .6 : t.maxX, i = {
3919
+ minX: n ? t.minX - 3.5 : t.minX,
3920
+ maxX: Math.max(t.maxX, r),
3921
3921
  minY: n ? t.minY - 7 : t.minY,
3922
3922
  maxY: t.maxY
3923
- }, i = this.backend.coordinateTransform, a = i(r.minX, r.minY), o = i(r.maxX, r.minY), s = i(r.maxX, r.maxY), c = i(r.minX, r.maxY);
3923
+ }, a = this.backend.coordinateTransform, o = a(i.minX, i.minY), s = a(i.maxX, i.minY), c = a(i.maxX, i.maxY), l = a(i.minX, i.maxY);
3924
3924
  return {
3925
- minX: Math.min(a.x, o.x, s.x, c.x),
3926
- maxX: Math.max(a.x, o.x, s.x, c.x),
3927
- minY: Math.min(a.y, o.y, s.y, c.y),
3928
- maxY: Math.max(a.y, o.y, s.y, c.y)
3925
+ minX: Math.min(o.x, s.x, c.x, l.x),
3926
+ maxX: Math.max(o.x, s.x, c.x, l.x),
3927
+ minY: Math.min(o.y, s.y, c.y, l.y),
3928
+ maxY: Math.max(o.y, s.y, c.y, l.y)
3929
3929
  };
3930
3930
  }
3931
3931
  fitArea(e) {