diff options
| author | bobzel <zzzman@gmail.com> | 2025-03-16 21:33:59 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-03-16 21:33:59 -0400 |
| commit | 35f7b94e59f72463a30a52dd0fd8b57288b79016 (patch) | |
| tree | 66ed024d42a63844837f1f27a0cb3c8e5273b7fb /src/client/views/collections/CollectionStackedTimeline.tsx | |
| parent | 1ffa8a8fb3e16bd5a3338d18782ddda0c2ffca03 (diff) | |
| parent | 920fb858854ca4866edc838b1db458ec7645f021 (diff) | |
Merge branch 'master' into DocCreatorMenu-work
Diffstat (limited to 'src/client/views/collections/CollectionStackedTimeline.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackedTimeline.tsx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx index c3047e5fb..a7a9f2114 100644 --- a/src/client/views/collections/CollectionStackedTimeline.tsx +++ b/src/client/views/collections/CollectionStackedTimeline.tsx @@ -187,13 +187,12 @@ export class CollectionStackedTimeline extends CollectionSubView<CollectionStack @computed get rangeClick() { // prettier-ignore return ScriptField.MakeFunction('stackedTimeline.clickAnchor(this, clientX)', - { stackedTimeline: 'any', clientX: 'number' }, { stackedTimeline: 'string' /* should be CollectionStackedTimeline */ } - )!; + { stackedTimeline: 'any', clientX: 'number' }, { stackedTimeline: this as unknown as string })!; // NOTE: scripts can't serialize a run-time React component as captured variable BUT this script will not be serialized so we can "stuff" anything we want in the capture variable } @computed get rangePlay() { // prettier-ignore return ScriptField.MakeFunction('stackedTimeline.playOnClick(this, clientX)', - { stackedTimeline: 'any', clientX: 'number' }, { stackedTimeline: 'string' /* should be CollectionStackedTimeline */})!; + { stackedTimeline: 'any', clientX: 'number' }, { stackedTimeline: this as unknown as string })!; // NOTE: scripts can't serialize a run-time React component as captured variable BUT this script will not be serialized so we can "stuff" anything we want in the capture variable } rangeClickScript = () => this.rangeClick; rangePlayScript = () => this.rangePlay; @@ -268,13 +267,13 @@ export class CollectionStackedTimeline extends CollectionSubView<CollectionStack setupMoveUpEvents( this, e, - action(() => { + action(movEv => { if (!wasSelecting) { this._markerStart = this._markerEnd = this.toTimeline(clientX - rect.x, rect.width); wasSelecting = true; this._timelineWrapper && (this._timelineWrapper.style.cursor = 'ew-resize'); } - this._markerEnd = this.toTimeline(e.clientX - rect.x, rect.width); + this._markerEnd = this.toTimeline(movEv.clientX - rect.x, rect.width); return false; }), action((upEvent, movement, isClick) => { @@ -844,7 +843,7 @@ class StackedTimelineAnchor extends ObservableReactComponent<StackedTimelineAnch styleProvider={this._props.styleProvider} renderDepth={this._props.renderDepth + 1} LayoutTemplate={undefined} - LayoutTemplateString={LabelBox.LayoutString('data')} + LayoutTemplateString={LabelBox.LayoutString('title')} isDocumentActive={this._props.isDocumentActive} PanelWidth={width} PanelHeight={height} |
