From d6131dbdb72fe220af1857e8090b0ca67db8b22d Mon Sep 17 00:00:00 2001 From: Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> Date: Tue, 13 Oct 2020 17:37:14 +0800 Subject: updates before merge --- src/client/views/nodes/PresBox.scss | 1 - src/client/views/nodes/PresBox.tsx | 1 + .../views/presentationview/PresElementBox.scss | 21 ++++++++------------- .../views/presentationview/PresElementBox.tsx | 17 +++++++---------- 4 files changed, 16 insertions(+), 24 deletions(-) (limited to 'src') 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 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 { - 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 { e.stopPropagation(); e.preventDefault(); @@ -278,9 +273,9 @@ export class PresElementBox extends ViewBoxBaseComponent {`${this.indexInPres + 1}.`} -
-
{ e.stopPropagation(); this.presExpandDocumentClick(); isSelected ? console.log('selected') : console.log('not selected'); }} style={{ maxWidth: (PresBox.Instance.toolbarWidth - 70) }}> - +
+ {isSelected ? StrCast(this.rootDoc.title)} @@ -288,7 +283,9 @@ export class PresElementBox extends ViewBoxBaseComponent + /> : + this.rootDoc.title + }
{"Movement speed"}
}>
300 ? "block" : "none" }}>{this.transition}
{"Duration"}
}>
300 ? "block" : "none" }}>{this.duration}
-- cgit v1.2.3-70-g09d2