@@ -845,8 +845,8 @@ export default class MarkdownPreview extends React.Component {
845
845
846
846
const zoomImgWidth = img . width * magnification
847
847
const zoomImgHeight = img . height * magnification
848
- const zoomInImgTop = document . body . clientHeight / 2 - zoomImgHeight / 2
849
- const zoomInImgLeft = document . body . clientWidth / 2 - zoomImgWidth / 2
848
+ const zoomImgTop = document . body . clientHeight / 2 - zoomImgHeight / 2
849
+ const zoomImgLeft = document . body . clientWidth / 2 - zoomImgWidth / 2
850
850
const originalImgTop = img . y + rect . top
851
851
const originalImgLeft = img . x + rect . left
852
852
const originalImgRect = {
@@ -856,8 +856,8 @@ export default class MarkdownPreview extends React.Component {
856
856
height : `${ img . height } px`
857
857
}
858
858
const zoomInImgRect = {
859
- top : `${ baseOnWidth ? zoomInImgTop : 0 } px` ,
860
- left : `${ baseOnWidth ? 0 : zoomInImgLeft } px` ,
859
+ top : `${ baseOnWidth ? zoomImgTop : 0 } px` ,
860
+ left : `${ baseOnWidth ? 0 : zoomImgLeft } px` ,
861
861
width : `${ zoomImgWidth } px` ,
862
862
height : `${ zoomImgHeight } px`
863
863
}
@@ -867,8 +867,8 @@ export default class MarkdownPreview extends React.Component {
867
867
zoomImg . src = img . src
868
868
zoomImg . style = `
869
869
position: absolute;
870
- top: ${ baseOnWidth ? zoomInImgTop : 0 } px;
871
- left: ${ baseOnWidth ? 0 : zoomInImgLeft } px;
870
+ top: ${ baseOnWidth ? zoomImgTop : 0 } px;
871
+ left: ${ baseOnWidth ? 0 : zoomImgLeft } px;
872
872
width: ${ zoomImgWidth } ;
873
873
height: ${ zoomImgHeight } px;
874
874
`
0 commit comments