pi-stereo-view 0.1.0 → 0.1.1
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/layout.ts +11 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/layout.ts
CHANGED
|
@@ -59,6 +59,17 @@ class TranscriptPane extends VStack {
|
|
|
59
59
|
]);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
override handleMouse(event: TuiMouseEvent): ReturnType<Container["handleMouse"]> {
|
|
63
|
+
if (event.type !== "wheel") return undefined;
|
|
64
|
+
// Native wheel routing gives any unused delta to the primary panel, Activity.
|
|
65
|
+
// Consume it here so the wheel only moves the panel under the pointer.
|
|
66
|
+
this.view.scrollBy(event.wheelDelta ?? 0);
|
|
67
|
+
return { handled: true, target: {
|
|
68
|
+
component: this, originX: event.screenX - event.x, originY: event.screenY - event.y,
|
|
69
|
+
width: event.width, height: event.height,
|
|
70
|
+
} };
|
|
71
|
+
}
|
|
72
|
+
|
|
62
73
|
override render(width: number): string[] {
|
|
63
74
|
// Native layout measures height here, then paints the original header and ScrollView.
|
|
64
75
|
// Empty preview rows avoid composing colored history text in ancestor measurements.
|