From 0a5e02a87fdabff5ff8399829ff857cae90fc1e2 Mon Sep 17 00:00:00 2001
From: mehekj <mehek.jethani@gmail.com>
Date: Sun, 20 Mar 2022 10:29:42 -0400
Subject: Revert "Merge remote-tracking branch 'origin/speedups2' into
 temporalmedia-mehek"

This reverts commit 1f7cf7babc76ecff5aef5fe663c48e067e85dd26, reversing
changes made to 1e3ad4de06f83eab54628de660529fefb9a0dc63.
---
 .../collections/CollectionStackedTimeline.tsx      | 23 ++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

(limited to 'src/client/views/collections/CollectionStackedTimeline.tsx')

diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx
index 61ddbe70d..7d9dc39ae 100644
--- a/src/client/views/collections/CollectionStackedTimeline.tsx
+++ b/src/client/views/collections/CollectionStackedTimeline.tsx
@@ -11,7 +11,7 @@ import { computedFn } from "mobx-utils";
 import { Doc, DocListCast } from "../../../fields/Doc";
 import { Id } from "../../../fields/FieldSymbols";
 import { List } from "../../../fields/List";
-import { listSpec } from "../../../fields/Schema";
+import { listSpec, makeInterface } from "../../../fields/Schema";
 import { ComputedField, ScriptField } from "../../../fields/ScriptField";
 import { Cast, NumCast } from "../../../fields/Types";
 import {
@@ -25,7 +25,7 @@ import { Docs } from "../../documents/Documents";
 import { DocumentManager } from "../../util/DocumentManager";
 import { DragManager } from "../../util/DragManager";
 import { LinkManager } from "../../util/LinkManager";
-import { ScriptingGlobals } from "../../util/ScriptingGlobals";
+import { Scripting } from "../../util/Scripting";
 import { SelectionManager } from "../../util/SelectionManager";
 import { SnappingManager } from "../../util/SnappingManager";
 import { Transform } from "../../util/Transform";
@@ -43,6 +43,8 @@ import {
 import { LabelBox } from "../nodes/LabelBox";
 import "./CollectionStackedTimeline.scss";
 
+type PanZoomDocument = makeInterface<[]>;
+const PanZoomDocument = makeInterface();
 export type CollectionStackedTimelineProps = {
     Play: () => void;
     Pause: () => void;
@@ -65,8 +67,11 @@ export enum TrimScope {
 }
 
 @observer
-export class CollectionStackedTimeline extends CollectionSubView<CollectionStackedTimelineProps>() {
-    @observable static SelectingRegion: CollectionStackedTimeline | undefined = undefined;
+export class CollectionStackedTimeline extends CollectionSubView<
+    PanZoomDocument,
+    CollectionStackedTimelineProps
+>(PanZoomDocument) {
+    @observable static SelectingRegion: CollectionStackedTimeline | undefined;
     @observable public static CurrentlyPlaying: Doc[];
 
     static RangeScript: ScriptField;
@@ -928,9 +933,7 @@ class StackedTimelineAnchor extends React.Component<StackedTimelineAnchorProps>
                         <div
                             key="right"
                             className="collectionStackedTimeline-resizer"
-                            onPointerDown={(e) =>
-                                this.onAnchorDown(e, this.props.mark, false)
-                            }
+                            onPointerDown={(e) => this.onAnchorDown(e, this.props.mark, false)}
                         />
                     </>
                 )}
@@ -938,12 +941,12 @@ class StackedTimelineAnchor extends React.Component<StackedTimelineAnchorProps>
         );
     }
 }
-ScriptingGlobals.add(function formatToTime(time: number): any {
+Scripting.addGlobal(function formatToTime(time: number): any {
     return formatTime(time);
 });
-ScriptingGlobals.add(function min(num1: number, num2: number): number {
+Scripting.addGlobal(function min(num1: number, num2: number): number {
     return Math.min(num1, num2);
 });
-ScriptingGlobals.add(function max(num1: number, num2: number): number {
+Scripting.addGlobal(function max(num1: number, num2: number): number {
     return Math.max(num1, num2);
 });
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

