From 75fa8e7e798566962d88fc3012c41c3179580e39 Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 10 Sep 2020 10:59:58 -0400 Subject: fixed following links on text hyperlink to use same code as linkMenu. fixed hyperlink delete button --- src/client/views/collections/CollectionDockingView.tsx | 2 +- .../collectionFreeForm/CollectionFreeFormLinkView.tsx | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/client/views/collections') diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index bed7e9735..d7a134eb3 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -292,7 +292,7 @@ export class CollectionDockingView extends CollectionSubView(doc => doc) { setTimeout(() => { CollectionDockingView.Instance._ignoreStateChange = JSON.stringify(CollectionDockingView.Instance._goldenLayout.toConfig()); this.stateChanged(); - this._flush!.end(); + this._flush?.end(); this._flush = undefined; }, 10); } diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx index 8bc3cdf1b..79a540210 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx @@ -108,18 +108,19 @@ export class CollectionFreeFormLinkView extends React.Component { - var rect = el.getBoundingClientRect(), top = rect.top, height = rect.height, - el = el.parentNode; + let rect = el.getBoundingClientRect(); + const top = rect.top, height = rect.height; + var el = el.parentNode; do { rect = el.getBoundingClientRect(); if (top <= rect.bottom === false && getComputedStyle(el).overflow === "hidden") return rect.bottom; // Check if the element is out of view due to a container scrolling if ((top + height) <= rect.top && getComputedStyle(el).overflow === "hidden") return rect.top; el = el.parentNode; - } while (el != document.body); + } while (el !== document.body); // Check its within the document viewport return top; //top <= document.documentElement.clientHeight && getComputedStyle(document.documentElement).overflow === "hidden"; - }; + } @computed get renderData() { this._start; -- cgit v1.2.3-70-g09d2