diff options
author | bobzel <zzzman@gmail.com> | 2019-04-11 08:51:39 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2019-04-11 08:51:39 -0400 |
commit | cbe23091b72c472be3e9a6de1cac5325171c282f (patch) | |
tree | 5045c765cb383e7981c9cad05946ceb14b1ecbca /src/client/views/Main.tsx | |
parent | e5411598c4d2ecc7a0b4d8584b576ff5f45ad2a0 (diff) |
fixed zoom not always rendering. fixed documents (images, pdfs) not appearing. fixed lint warnings.
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r-- | src/client/views/Main.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx index b9e209b3c..5fd778c7e 100644 --- a/src/client/views/Main.tsx +++ b/src/client/views/Main.tsx @@ -213,8 +213,9 @@ export class Main extends React.Component { _textProxyDiv: React.RefObject<HTMLDivElement>; @action SetTextDoc(textDoc?: Document, div?: HTMLDivElement, tx?: Transform) { - if (this._textTargetDiv) + if (this._textTargetDiv) { this._textTargetDiv.style.color = this._textColor; + } this._textDoc = undefined; this._textDoc = textDoc; @@ -231,12 +232,12 @@ export class Main extends React.Component { @action textScroll = (e: React.UIEvent) => { if (this._textProxyDiv.current && this._textTargetDiv) { - this._textTargetDiv.scrollTop = this._textScroll = this._textProxyDiv.current.children[0].scrollTop + this._textTargetDiv.scrollTop = this._textScroll = this._textProxyDiv.current.children[0].scrollTop; } } textBoxDown = (e: React.PointerEvent) => { - if (e.button != 0 || e.metaKey || e.altKey) { + if (e.button !== 0 || e.metaKey || e.altKey) { document.addEventListener("pointermove", this.textBoxMove); document.addEventListener('pointerup', this.textBoxUp); } |