diff options
| author | andrewdkim <adkim414@gmail.com> | 2019-06-20 11:09:03 -0400 |
|---|---|---|
| committer | andrewdkim <adkim414@gmail.com> | 2019-06-20 11:09:03 -0400 |
| commit | b856d4c0be0b08bf154d552226457b82d31cf81c (patch) | |
| tree | fbcf2ac0ebe6ea358bada7efb5689f92bf3d2bc9 /src/client/views/DocumentDecorations.tsx | |
| parent | da2157616ca4e614dacbf26fb5fa6758b51a209e (diff) | |
| parent | a5478b2d4cc3b66c6b58471cbb05c623d0109724 (diff) | |
merge with master
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index ceca940b6..d8642d675 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -466,7 +466,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> SelectionManager.SelectedDocuments().forEach(element => { const rect = element.ContentDiv ? element.ContentDiv.getBoundingClientRect() : new DOMRect(); - if (rect.width !== 0 && (dX != 0 || dY != 0 || dW != 0 || dH != 0)) { + if (rect.width !== 0 && (dX !== 0 || dY !== 0 || dW !== 0 || dH !== 0)) { let doc = PositionDocument(element.props.Document); let nwidth = doc.nativeWidth || 0; let nheight = doc.nativeHeight || 0; @@ -503,8 +503,8 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> proto.nativeWidth = (doc.width || 0) / doc.height * NumCast(proto.nativeHeight); } } else { - doc.width = zoomBasis * actualdW; - doc.height = zoomBasis * actualdH; + dW && (doc.width = zoomBasis * actualdW); + dH && (doc.height = zoomBasis * actualdH); proto.autoHeight = undefined; } } |
