@sbb-esta/lyne-elements-experimental 5.2.0 → 5.4.0

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.
@@ -15371,9 +15371,9 @@ let SeatReservationBaseElement = (() => {
15371
15371
  seatReservation?.coachItems?.forEach((coachItem) => {
15372
15372
  const allElemenets = (coachItem.graphicElements?.filter((e) => e.icon && !this.notAreaElements.includes(e.icon)))?.concat(coachItem.serviceElements || []).concat(coachItem.places || []) || [];
15373
15373
  const hasOverhangingElements = this._isOverhangingElementsPresent(coachItem.dimension.w, allElemenets);
15374
- const areaElements = coachItem.graphicElements?.filter((graphicalElement) => !this.notAreaElements.includes(graphicalElement.icon)).map((ele) => this._getCalculatedDimensionPositionElement(ele, coachItem.dimension, true));
15375
- const otherElements = coachItem.graphicElements?.filter((graphicalElement) => this.notAreaElements.includes(graphicalElement.icon)).map((ele) => this._getCalculatedDimensionPositionElement(ele, coachItem.dimension, false));
15376
- const serviceElements = coachItem.serviceElements?.map((ele) => this._getCalculatedDimensionPositionElement(ele, coachItem.dimension, true));
15374
+ const areaElements = coachItem.graphicElements?.filter((graphicalElement) => !this.notAreaElements.includes(graphicalElement.icon)).map((ele) => this._getCalculatedDimensionPositionElement(ele, coachItem.dimension, "AREA"));
15375
+ const otherElements = coachItem.graphicElements?.filter((graphicalElement) => this.notAreaElements.includes(graphicalElement.icon)).map((ele) => this._getCalculatedDimensionPositionElement(ele, coachItem.dimension, "OTHER"));
15376
+ const serviceElements = coachItem.serviceElements?.map((ele) => this._getCalculatedDimensionPositionElement(ele, coachItem.dimension, "SERVICE"));
15377
15377
  const borderMiddleElement = this._getCalculatedMiddleBorderElement(coachItem);
15378
15378
  const calcCoachDimension = this.getCalculatedDimension({ ...coachItem.dimension });
15379
15379
  const coachSturcture = {
@@ -15448,14 +15448,14 @@ let SeatReservationBaseElement = (() => {
15448
15448
  * Returns the calculated positions and dimensions of graphical, service and area elements
15449
15449
  * @returns BaseElement
15450
15450
  */
15451
- _getCalculatedDimensionPositionElement(element, coachDimension, isCalcAreaElement) {
15451
+ _getCalculatedDimensionPositionElement(element, coachDimension, elementType) {
15452
15452
  const dim = { ...element.dimension };
15453
15453
  const pos = { ...element.position };
15454
15454
  const rotation = element.rotation || 0;
15455
15455
  const isNotFixedRotationGraphicalElement = this.notAreaElements.concat(this.notFixedRotatableAreaIcons).indexOf(element.icon) === -1;
15456
15456
  const calcRotation = this.alignVertical && isNotFixedRotationGraphicalElement ? rotation - 90 : rotation;
15457
15457
  let areaMounting = null;
15458
- if (isCalcAreaElement) {
15458
+ if (elementType === "AREA") {
15459
15459
  const isNotTableGraphic = element.icon?.indexOf("TABLE") === -1;
15460
15460
  const areaProperty = element.icon && isNotTableGraphic ? element.icon : null;
15461
15461
  const stretchHeight = this.isElementDirectlyOnBorder(element, coachDimension) && areaProperty !== "ENTRY_EXIT";
@@ -15467,7 +15467,7 @@ let SeatReservationBaseElement = (() => {
15467
15467
  if (!stretchHeight) pos.y += this.coachBorderOffset - this.coachBorderOffset / 3;
15468
15468
  }
15469
15469
  if (stretchHeight) dim.h += this.coachBorderOffset - this.coachBorderOffset / 3;
15470
- } else {
15470
+ } else if (elementType === "OTHER") {
15471
15471
  if (element.position.y === 0) pos.y -= this.coachBorderOffset;
15472
15472
  if (coachDimension.h === element.position.y + element.dimension.h) dim.h += this.coachBorderOffset * 2;
15473
15473
  }
package/easter-egg.js ADDED
@@ -0,0 +1 @@
1
+ import{SbbEasterEggElement as e}from"./easter-egg.pure.js";export*from"./easter-egg.pure.js";e.define();