From a55c1ef0211cef68bebdb83b7ee8723c7bcf6edc Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 1 Sep 2020 12:25:34 -0400 Subject: fixed tabs to never select/switch on hover unless dragging. fixed display of highlight icons in menu bar. fixed placement of docDecorations level selector. --- src/client/views/nodes/FontIconBox.scss | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/client/views/nodes/FontIconBox.scss') diff --git a/src/client/views/nodes/FontIconBox.scss b/src/client/views/nodes/FontIconBox.scss index 75bc90d7a..d7c5e9c92 100644 --- a/src/client/views/nodes/FontIconBox.scss +++ b/src/client/views/nodes/FontIconBox.scss @@ -37,9 +37,10 @@ .menuButton-round { border-radius: 100%; background-color: black; + padding: 0; .fontIconBox-label { - margin-left: -10px; // button padding is 10px; + //margin-left: -10px; // button padding is 10px; bottom: 0; position: absolute; } @@ -52,7 +53,6 @@ .menuButton-square { padding-top: 3px; padding-bottom: 3px; - padding-left: 5px; .fontIconBox-label { border-radius: 0px; @@ -64,7 +64,8 @@ .menuButton, .menuButton-round, .menuButton-square { - width: 100%; + margin-left: -5%; + width: 110%; height: 100%; pointer-events: all; touch-action: none; @@ -72,6 +73,7 @@ .menuButton-wrap { touch-action: none; border-radius: 8px; + width: 100%; // &:hover { // background: rgb(61, 61, 61); @@ -89,4 +91,13 @@ width: 95% !important; height: 95%; } +} +.menuButton-round { + width: 100%; + svg { + width: 50% !important; + height: 50%; + position: relative; + bottom: 2px; + } } \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 124ac1ca9070e1997e7ab9d667255cec924c79dc Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 1 Sep 2020 12:59:41 -0400 Subject: fixed some layout issues with fonticons that have no label. fixed anchor link colors for pdfs and webboes. --- src/client/views/nodes/FontIconBox.scss | 7 ++----- src/client/views/nodes/FontIconBox.tsx | 2 +- src/client/views/nodes/WebBox.tsx | 2 +- src/client/views/pdf/PDFViewer.tsx | 12 ++++++++---- 4 files changed, 12 insertions(+), 11 deletions(-) (limited to 'src/client/views/nodes/FontIconBox.scss') diff --git a/src/client/views/nodes/FontIconBox.scss b/src/client/views/nodes/FontIconBox.scss index d7c5e9c92..33ac85a0e 100644 --- a/src/client/views/nodes/FontIconBox.scss +++ b/src/client/views/nodes/FontIconBox.scss @@ -34,6 +34,7 @@ } } +.menuButton-circle, .menuButton-round { border-radius: 100%; background-color: black; @@ -62,6 +63,7 @@ } .menuButton, +.menuButton-circle, .menuButton-round, .menuButton-square { margin-left: -5%; @@ -74,11 +76,6 @@ touch-action: none; border-radius: 8px; width: 100%; - - // &:hover { - // background: rgb(61, 61, 61); - // cursor: pointer; - // } } .menuButton-icon-square { diff --git a/src/client/views/nodes/FontIconBox.tsx b/src/client/views/nodes/FontIconBox.tsx index c55b9d9f2..a34bf64b0 100644 --- a/src/client/views/nodes/FontIconBox.tsx +++ b/src/client/views/nodes/FontIconBox.tsx @@ -63,7 +63,7 @@ export class FontIconBox extends DocComponent( const label = StrCast(this.rootDoc.label, StrCast(this.rootDoc.title)); const color = StrCast(this.layoutDoc.color, this._foregroundColor); const backgroundColor = StrCast(this.layoutDoc._backgroundColor, StrCast(this.rootDoc.backgroundColor, this.props.backgroundColor?.(this.rootDoc, this.props.renderDepth))); - const shape = StrCast(this.layoutDoc.iconShape, "round"); + const shape = StrCast(this.layoutDoc.iconShape, label ? "round" : "circle"); const icon = StrCast(this.dataDoc.icon, "user") as any; const presSize = shape === 'round' ? 25 : 30; const presTrailsIcon = ([clipDoc]); clipDoc.rootDocument = targetDoc; targetDoc.layoutKey = "layout"; - const annotationDoc = this.highlight("rgba(146, 245, 95, 0.467)"); // yellowish highlight color when dragging out a text selection + const annotationDoc = this.highlight("rgba(173, 216, 230, 0.3)"); // hyperlink color if (annotationDoc) { DragManager.StartPdfAnnoDrag([ele], new DragManager.PdfAnnoDragData(this.props.Document, annotationDoc, targetDoc), e.pageX, e.pageY, { dragComplete: e => { diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 8edb0e178..bd9723fc2 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -240,8 +240,10 @@ export class PDFViewer extends ViewBoxAnnotatableComponent { - this._pdfViewer.currentScaleValue = this._zoomed = 1; - this.gotoPage(this.Document._curPage || 1); + if (this._pdfViewer._setDocumentViewerElement.offsetParent) { + this._pdfViewer.currentScaleValue = this._zoomed = 1; + this.gotoPage(this.Document._curPage || 1); + } document.removeEventListener("pagesinit", this.pagesinit); }); @@ -337,7 +339,9 @@ export class PDFViewer extends ViewBoxAnnotatableComponent { - this._pdfViewer?.scrollPageIntoView({ pageNumber: Math.min(Math.max(1, p), this._pageSizes.length) }); + if (this._pdfViewer?._setDocumentViewerElement?.offsetParent) { + this._pdfViewer?.scrollPageIntoView({ pageNumber: Math.min(Math.max(1, p), this._pageSizes.length) }); + } } @action @@ -597,7 +601,7 @@ export class PDFViewer extends ViewBoxAnnotatableComponent { -- cgit v1.2.3-70-g09d2