From d935a8c1aad3fa6acaa4522aeb667afaaeddc60c Mon Sep 17 00:00:00 2001
From: Aubrey Li <Aubrey-Li>
Date: Thu, 14 Apr 2022 18:16:01 -0400
Subject: expand children

---
 src/client/views/nodes/trails/PresElementBox.tsx | 26 +++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

(limited to 'src/client/views/nodes/trails/PresElementBox.tsx')

diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx
index 1da7a596a..326c6bd8e 100644
--- a/src/client/views/nodes/trails/PresElementBox.tsx
+++ b/src/client/views/nodes/trails/PresElementBox.tsx
@@ -114,6 +114,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
                 e.stopPropagation();
                 e.preventDefault();
                 PresBox.Instance.modifierSelect(doc, this._itemRef.current!, this._dragRef.current!, !e.shiftKey && !e.ctrlKey && !e.metaKey, e.ctrlKey || e.metaKey, e.shiftKey);
+                this.presExpandDocumentClick();
             }}>
                 <div className="presItem-groupNum">
                     {`${ind + 1}.`}
@@ -353,7 +354,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
                     <div className="presItem-number">
                         {`${this.indexInPres + 1}.`}
                     </div>}
-                    {isGroup ?
+                {isGroup ?
                     <div ref={miniView ? null : this._dragRef} className={`presItem-slide ${isSelected ? "activeGroup" : "group"}`}
                         style={{
                             backgroundColor: this.props.styleProvider?.(this.layoutDoc, this.props, StyleProp.BackgroundColor),
@@ -370,6 +371,29 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps>() {
                             />
                         </div>
                         <div className={"presItem-slideButtons"}>
+                            <Tooltip title={<><div className="dash-tooltip">{"Update view"}</div></>}>
+                                <div className="slideButton"
+                                    onClick={() => this.updateView(targetDoc, activeItem)}
+                                    style={{ fontWeight: 700, display: activeItem.presPinView ? "flex" : "none" }}>V</div>
+                            </Tooltip>
+                            {this.indexInPres === 0 ? (null) : <Tooltip title={<><div className="dash-tooltip">{activeItem.groupWithUp ? "Ungroup" : "Group with up"}</div></>}>
+                                <div className="slideButton"
+                                    onClick={() => activeItem.groupWithUp = !activeItem.groupWithUp}
+                                    style={{
+                                        zIndex: 1000 - this.indexInPres,
+                                        fontWeight: 700,
+                                        backgroundColor: activeItem.groupWithUp ? presColorBool ? presBoxColor : Colors.MEDIUM_BLUE : undefined,
+                                        height: activeItem.groupWithUp ? 53 : 18,
+                                        transform: activeItem.groupWithUp ? "translate(0, -17px)" : undefined
+                                    }}>
+                                    <div style={{ transform: activeItem.groupWithUp ? "rotate(180deg) translate(0, -17.5px)" : "rotate(0deg)" }}>
+                                        <FontAwesomeIcon icon={"arrow-up"} onPointerDown={e => e.stopPropagation()} />
+                                    </div>
+                                </div>
+                            </Tooltip>}
+                            <Tooltip title={<><div className="dash-tooltip">{this.rootDoc.presExpandInlineButton ? "Minimize" : "Expand"}</div></>}><div className={"slideButton"} onClick={e => { e.stopPropagation(); this.presExpandDocumentClick(); }}>
+                                <FontAwesomeIcon icon={this.rootDoc.presExpandInlineButton ? "eye-slash" : "eye"} onPointerDown={e => e.stopPropagation()} />
+                            </div></Tooltip>
                             <Tooltip title={<><div className="dash-tooltip">{"Remove from presentation"}</div></>}><div
                                 className={"slideButton"}
                                 onClick={this.removeItem}>
-- 
cgit v1.2.3-70-g09d2

