diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-10-13 17:37:14 +0800 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-10-13 17:37:14 +0800 |
commit | d6131dbdb72fe220af1857e8090b0ca67db8b22d (patch) | |
tree | 760c1cc1d5bc6882a338be94b4f587be58b98849 /src | |
parent | 3d266cb4636aad2e6fe39595b113b0dd52f4f329 (diff) |
updates before merge
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/PresBox.scss | 1 | ||||
-rw-r--r-- | src/client/views/nodes/PresBox.tsx | 1 | ||||
-rw-r--r-- | src/client/views/presentationview/PresElementBox.scss | 21 | ||||
-rw-r--r-- | src/client/views/presentationview/PresElementBox.tsx | 17 |
4 files changed, 16 insertions, 24 deletions
diff --git a/src/client/views/nodes/PresBox.scss b/src/client/views/nodes/PresBox.scss index 7bc6c1dfd..ad2e7122f 100644 --- a/src/client/views/nodes/PresBox.scss +++ b/src/client/views/nodes/PresBox.scss @@ -22,7 +22,6 @@ $light-background: #ececec; position: relative; height: calc(100% - 67px); width: 100%; - margin-top: 3px; } .presBox-toolbar-dropdown { diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index 2af00586b..1af1d5c90 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -119,6 +119,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> this.rootDoc._replacedChrome = "replaced"; this.layoutDoc.presStatus = "edit"; this.layoutDoc._gridGap = 0; + this.layoutDoc._yMargin = 0; this.turnOffEdit(true); DocListCastAsync((Doc.UserDoc().myPresentations as Doc).data).then(async pres => { await Promise.all(pres!); diff --git a/src/client/views/presentationview/PresElementBox.scss b/src/client/views/presentationview/PresElementBox.scss index d757fc1de..0e1953e7c 100644 --- a/src/client/views/presentationview/PresElementBox.scss +++ b/src/client/views/presentationview/PresElementBox.scss @@ -25,13 +25,12 @@ $slide-active: #5B9FDD; align-items: center; .presItem-number { + margin-top: 7px; font-size: 12px; font-weight: 700; text-align: center; justify-self: center; - align-self: center; - /* padding-right: 3%; */ - /* width: 8%; */ + align-self: flex-start; position: relative; display: inline-block; overflow: hidden; @@ -44,7 +43,7 @@ $slide-active: #5B9FDD; position: relative; background-color: #d5dce2; border-radius: 5px; - height: calc(100% - 5px); + height: calc(100% - 8px); width: calc(100% - 5px); display: grid; grid-template-columns: max-content max-content max-content max-content auto; @@ -68,17 +67,12 @@ $slide-active: #5B9FDD; } .presItem-slide.active { - border: solid 2px $dark-blue; -} - -.presItem-slide:hover { - background: $slide-hover; + box-shadow: 0 0 0px 1.5px $dark-blue; } -.documentView-node { - position: absolute; - z-index: 1; -} +// .presItem-slide:hover { +// background: $slide-hover; +// } .presElementBox-time { align-self: center; @@ -135,6 +129,7 @@ $slide-active: #5B9FDD; justify-content: center; align-items: center; transition: 0.2s; + margin-right: 3px; } .slideButton:hover { diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx index 8d53c8cc6..97344d33d 100644 --- a/src/client/views/presentationview/PresElementBox.tsx +++ b/src/client/views/presentationview/PresElementBox.tsx @@ -178,21 +178,16 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc } onPointerOver = (e: any) => { - console.log('pointerOver'); document.removeEventListener("pointermove", this.onPointerMove); document.addEventListener("pointermove", this.onPointerMove); } onPointerMove = (e: PointerEvent) => { - console.log('pointerMove'); const slide = this._itemRef.current!; const rect = slide!.getBoundingClientRect(); let y = e.clientY - rect.top; //y position within the element. let height = slide.clientHeight; let halfLine = height / 2; - console.log(y); - console.log(height); - console.log(halfLine); if (DragManager.docsBeingDragged.length > 1) { if (y <= halfLine) { slide.style.borderTop = "solid 2px #5B9FDD"; @@ -248,7 +243,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc return ( <div className={`presItem-container`} key={this.props.Document[Id] + this.indexInPres} ref={this._itemRef} - style={{ backgroundColor: isSelected ? "#AEDDF8" : "rgba(0,0,0,0)" }} + style={{ backgroundColor: isSelected ? "#AEDDF8" : "rgba(0,0,0,0)", opacity: isDragging ? 0.3 : 1 }} onClick={e => { e.stopPropagation(); e.preventDefault(); @@ -278,9 +273,9 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc <div className="presItem-number"> {`${this.indexInPres + 1}.`} </div> - <div ref={this._dragRef} className={`presItem-slide ${isSelected ? "active" : ""}`} style={{ opacity: isDragging ? 0.3 : 1 }}> - <div className="presItem-name" onClick={e => { e.stopPropagation(); this.presExpandDocumentClick(); isSelected ? console.log('selected') : console.log('not selected'); }} style={{ maxWidth: (PresBox.Instance.toolbarWidth - 70) }}> - <EditableView + <div ref={this._dragRef} className={`presItem-slide ${isSelected ? "active" : ""}`}> + <div className="presItem-name" style={{ maxWidth: (PresBox.Instance.toolbarWidth - 70) }}> + {isSelected ? <EditableView ref={this._titleRef} contents={this.rootDoc.title} GetValue={() => StrCast(this.rootDoc.title)} @@ -288,7 +283,9 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc this.onSetValue(value); return true; })} - /> + /> : + this.rootDoc.title + } </div> <Tooltip title={<><div className="dash-tooltip">{"Movement speed"}</div></>}><div className="presElementBox-time" style={{ display: PresBox.Instance.toolbarWidth > 300 ? "block" : "none" }}>{this.transition}</div></Tooltip> <Tooltip title={<><div className="dash-tooltip">{"Duration"}</div></>}><div className="presElementBox-time" style={{ display: PresBox.Instance.toolbarWidth > 300 ? "block" : "none" }}>{this.duration}</div></Tooltip> |