awesome-timeline-react 0.9.0 → 0.10.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.
- package/dist/_tsup-dts-rollup.d.mts +6 -0
- package/dist/_tsup-dts-rollup.d.ts +6 -0
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -447,6 +447,7 @@ var DEFAULT_THEME = {
|
|
|
447
447
|
laneGap: 2,
|
|
448
448
|
rowPaddingY: 10,
|
|
449
449
|
barRadius: 5,
|
|
450
|
+
minHitWidth: 0,
|
|
450
451
|
groupChildBackground: "rgba(0,0,0,0.05)",
|
|
451
452
|
groupShadowColor: "rgba(0,0,0,0.22)"
|
|
452
453
|
};
|
|
@@ -680,7 +681,8 @@ var DEFAULT_GEOMETRY = {
|
|
|
680
681
|
laneTopOffset: 10,
|
|
681
682
|
rowBaseHeight: 40,
|
|
682
683
|
staticEventBaseHeight: 20,
|
|
683
|
-
barRadius: 5
|
|
684
|
+
barRadius: 5,
|
|
685
|
+
minHitWidth: 0
|
|
684
686
|
};
|
|
685
687
|
var geometryFromTheme = (theme) => {
|
|
686
688
|
const barHeight = theme.barHeight;
|
|
@@ -691,7 +693,8 @@ var geometryFromTheme = (theme) => {
|
|
|
691
693
|
laneTopOffset: rowPaddingY,
|
|
692
694
|
rowBaseHeight: barHeight + 2 * rowPaddingY,
|
|
693
695
|
staticEventBaseHeight: barHeight,
|
|
694
|
-
barRadius: theme.barRadius
|
|
696
|
+
barRadius: theme.barRadius,
|
|
697
|
+
minHitWidth: theme.minHitWidth
|
|
695
698
|
};
|
|
696
699
|
};
|
|
697
700
|
|
|
@@ -1240,7 +1243,8 @@ var hitTest = (scene, view, x, y) => {
|
|
|
1240
1243
|
width: timeToWidth(event.startTime, event.endTime, tick),
|
|
1241
1244
|
height: geometry.barHeight
|
|
1242
1245
|
};
|
|
1243
|
-
|
|
1246
|
+
const hit = rect.width >= geometry.minHitWidth ? rect : __spreadProps(__spreadValues({}, rect), { x: rect.x + (rect.width - geometry.minHitWidth) / 2, width: geometry.minHitWidth });
|
|
1247
|
+
if (rectContains(hit, x, y)) {
|
|
1244
1248
|
return { kind: "event", event, rowId, rect };
|
|
1245
1249
|
}
|
|
1246
1250
|
}
|