@mim/histui 0.2.1 → 0.2.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.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.2.1",
6
+ "version": "0.2.2",
7
7
  "description": "Reusable Histui interactive timeline package for PastStruct and normalized historical records.",
8
8
  "type": "module",
9
9
  "main": "./src/index.js",
@@ -1595,7 +1595,8 @@ export class TimelineView {
1595
1595
  }
1596
1596
 
1597
1597
  if (metrics.placement === "center") {
1598
- return clamp(this.direction === "rtl" ? metrics.width - offset : offset, 18, metrics.width - 18);
1598
+ const side = this.direction === "rtl" ? -1 : 1;
1599
+ return clamp(metrics.axisCoordinate + side * offset, 18, metrics.width - 18);
1599
1600
  }
1600
1601
 
1601
1602
  const side = metrics.axisCoordinate < metrics.width / 2 ? 1 : -1;