Skip to content

Commit

Permalink
Merge pull request #54 from shockingsrose/master
Browse files Browse the repository at this point in the history
 修复相同大小的图片切换时,容器上移问题
  • Loading branch information
SummerOverture authored May 13, 2021
2 parents 7affa81 + 4339449 commit ed300e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/components/PicturePreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ class PicturePreview extends Component<PicturePreviewProps, PicturePreviewState>
width: num2px(width),
height: num2px(height),
left: num2px(oriLeft + (oriWidth - width) / 2),
top: num2px(oriTop + (oriHeight - height) / 2)
top: num2px(oriTop + Math.trunc((oriHeight - height) / 2))
};

this.setState({
Expand Down

0 comments on commit ed300e4

Please sign in to comment.