From 6bc3c1fbd5d44d0d4ea53e219962cfaaa404d151 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 20 Sep 2023 14:10:28 -0400
Subject: removed fwd/back buttons for carousel in favor of just clicking on
 next/previous regions.

---
 .../views/collections/CollectionCarousel3DView.tsx       | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

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

diff --git a/src/client/views/collections/CollectionCarousel3DView.tsx b/src/client/views/collections/CollectionCarousel3DView.tsx
index cd59a91a1..4bc72772a 100644
--- a/src/client/views/collections/CollectionCarousel3DView.tsx
+++ b/src/client/views/collections/CollectionCarousel3DView.tsx
@@ -96,8 +96,7 @@ export class CollectionCarousel3DView extends CollectionSubView() {
         this.layoutDoc._carousel_index = (NumCast(this.layoutDoc._carousel_index) + direction + this.childLayoutPairs.length) % this.childLayoutPairs.length;
     };
 
-    onArrowClick = (e: React.MouseEvent, direction: number) => {
-        e.stopPropagation();
+    onArrowClick = (direction: number) => {
         this.changeSlide(direction);
         !this.layoutDoc.autoScrollOn && (this.layoutDoc.showScrollButton = direction === 1 ? 'fwd' : 'back'); // while autoscroll is on, keep the other autoscroll button hidden
         !this.layoutDoc.autoScrollOn && this.fadeScrollButton(); // keep pause button visible while autoscroll is on
@@ -128,16 +127,11 @@ export class CollectionCarousel3DView extends CollectionSubView() {
     };
 
     @computed get buttons() {
-        if (!this.props.isContentActive()) return null;
         return (
             <div className="arrow-buttons">
-                <div key="back" className="carousel3DView-back" style={{ background: `${StrCast(this.props.Document.backgroundColor)}` }} onClick={e => this.onArrowClick(e, -1)}>
-                    <FontAwesomeIcon icon="angle-left" size={'2x'} />
-                </div>
-                <div key="fwd" className="carousel3DView-fwd" style={{ background: `${StrCast(this.props.Document.backgroundColor)}` }} onClick={e => this.onArrowClick(e, 1)}>
-                    <FontAwesomeIcon icon="angle-right" size={'2x'} />
-                </div>
-                {this.autoScrollButton}
+                <div title="click to go back" key="back" className="carousel3DView-back" onClick={e => this.onArrowClick(-1)} />
+                <div title="click to advance" key="fwd" className="carousel3DView-fwd" onClick={e => this.onArrowClick(1)} />
+                {/* {this.autoScrollButton} */}
             </div>
         );
     }
@@ -176,7 +170,7 @@ export class CollectionCarousel3DView extends CollectionSubView() {
                 <div className="carousel-wrapper" style={{ transform: `translateX(${this.translateX}px)` }}>
                     {this.content}
                 </div>
-                {this.props.Document._chromeHidden ? null : this.buttons}
+                {this.buttons}
                 <div className="dot-bar">{this.dots}</div>
             </div>
         );
-- 
cgit v1.2.3-70-g09d2

