From 14a2f361c73e468547d48792478e5e7e7e78f4d6 Mon Sep 17 00:00:00 2001
From: vellichora <fangrui_tong@brown.edu>
Date: Sat, 29 Feb 2020 13:52:53 -0500
Subject: filter UI

---
 src/client/views/search/CheckBox.tsx | 146 +++++++++++++++++------------------
 1 file changed, 73 insertions(+), 73 deletions(-)

(limited to 'src/client/views/search/CheckBox.tsx')

diff --git a/src/client/views/search/CheckBox.tsx b/src/client/views/search/CheckBox.tsx
index a9d48219a..8c97d5dbc 100644
--- a/src/client/views/search/CheckBox.tsx
+++ b/src/client/views/search/CheckBox.tsx
@@ -17,8 +17,8 @@ interface CheckBoxProps {
 export class CheckBox extends React.Component<CheckBoxProps>{
     // true = checked, false = unchecked
     @observable private _status: boolean;
-    @observable private uncheckTimeline: anime.AnimeTimelineInstance;
-    @observable private checkTimeline: anime.AnimeTimelineInstance;
+    // @observable private uncheckTimeline: anime.AnimeTimelineInstance;
+    // @observable private checkTimeline: anime.AnimeTimelineInstance;
     @observable private checkRef: any;
     @observable private _resetReaction?: IReactionDisposer;
 
@@ -28,87 +28,87 @@ export class CheckBox extends React.Component<CheckBoxProps>{
         this._status = this.props.originalStatus;
         this.checkRef = React.createRef();
 
-        this.checkTimeline = anime.timeline({
-            loop: false,
-            autoplay: false,
-            direction: "normal",
-        }); this.uncheckTimeline = anime.timeline({
-            loop: false,
-            autoplay: false,
-            direction: "normal",
-        });
+        // this.checkTimeline = anime.timeline({
+        //     loop: false,
+        //     autoplay: false,
+        //     direction: "normal",
+        // }); this.uncheckTimeline = anime.timeline({
+        //     loop: false,
+        //     autoplay: false,
+        //     direction: "normal",
+        // });
     }
 
-    componentDidMount = () => {
-        this.uncheckTimeline.add({
-            targets: this.checkRef.current,
-            easing: "easeInOutQuad",
-            duration: 500,
-            opacity: 0,
-        });
-        this.checkTimeline.add({
-            targets: this.checkRef.current,
-            easing: "easeInOutQuad",
-            duration: 500,
-            strokeDashoffset: [anime.setDashoffset, 0],
-            opacity: 1
-        });
+    // componentDidMount = () => {
+    //     this.uncheckTimeline.add({
+    //         targets: this.checkRef.current,
+    //         easing: "easeInOutQuad",
+    //         duration: 500,
+    //         opacity: 0,
+    //     });
+    //     this.checkTimeline.add({
+    //         targets: this.checkRef.current,
+    //         easing: "easeInOutQuad",
+    //         duration: 500,
+    //         strokeDashoffset: [anime.setDashoffset, 0],
+    //         opacity: 1
+    //     });
 
-        if (this.props.originalStatus) {
-            this.checkTimeline.play();
-            this.checkTimeline.restart();
-        }
+    //     if (this.props.originalStatus) {
+    //         this.checkTimeline.play();
+    //         this.checkTimeline.restart();
+    //     }
 
-        this._resetReaction = reaction(
-            () => this.props.parent._resetBoolean,
-            () => {
-                if (this.props.parent._resetBoolean) {
-                    runInAction(() => {
-                        this.reset();
-                        this.props.parent._resetCounter++;
-                        if (this.props.parent._resetCounter === this.props.numCount) {
-                            this.props.parent._resetCounter = 0;
-                            this.props.parent._resetBoolean = false;
-                        }
-                    });
-                }
-            },
-        );
-    }
+    //     this._resetReaction = reaction(
+    //         () => this.props.parent._resetBoolean,
+    //         () => {
+    //             if (this.props.parent._resetBoolean) {
+    //                 runInAction(() => {
+    //                     this.reset();
+    //                     this.props.parent._resetCounter++;
+    //                     if (this.props.parent._resetCounter === this.props.numCount) {
+    //                         this.props.parent._resetCounter = 0;
+    //                         this.props.parent._resetBoolean = false;
+    //                     }
+    //                 });
+    //             }
+    //         },
+    //     );
+    // }
 
-    @action.bound
-    reset() {
-        if (this.props.default) {
-            if (!this._status) {
-                this._status = true;
-                this.checkTimeline.play();
-                this.checkTimeline.restart();
-            }
-        }
-        else {
-            if (this._status) {
-                this._status = false;
-                this.uncheckTimeline.play();
-                this.uncheckTimeline.restart();
-            }
-        }
+    // @action.bound
+    // reset() {
+    //     if (this.props.default) {
+    //         if (!this._status) {
+    //             this._status = true;
+    //             this.checkTimeline.play();
+    //             this.checkTimeline.restart();
+    //         }
+    //     }
+    //     else {
+    //         if (this._status) {
+    //             this._status = false;
+    //             this.uncheckTimeline.play();
+    //             this.uncheckTimeline.restart();
+    //         }
+    //     }
 
-        this.props.updateStatus(this.props.default);
-    }
+    //     this.props.updateStatus(this.props.default);
+    // }
 
     @action.bound
     onClick = () => {
-        if (this._status) {
-            this.uncheckTimeline.play();
-            this.uncheckTimeline.restart();
-        }
-        else {
-            this.checkTimeline.play();
-            this.checkTimeline.restart();
+        // if (this._status) {
+        //     this.uncheckTimeline.play();
+        //     this.uncheckTimeline.restart();
+        // }
+        // else {
+        //     this.checkTimeline.play();
+        //     this.checkTimeline.restart();
 
-        }
-        this._status = !this._status;
-        this.props.updateStatus(this._status);
+        // }
+        // this._status = !this._status;
+        // this.props.updateStatus(this._status);
 
     }
 
-- 
cgit v1.2.3-70-g09d2

