Skip to content

Commit

Permalink
feat: 长图模式
Browse files Browse the repository at this point in the history
  • Loading branch information
MinJieLiu committed May 4, 2020
1 parent 070a080 commit db0b998
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { IPhotoSliderProps } from 'react-photo-view/dist/PhotoSlider';
import photo1 from './1.jpg';
import photo2 from './2.jpg';
import photo3 from './3.jpg';
import photo4 from './4.jpg';
import photo4 from './4.png';
import photo5 from './5.jpg';
import photo6 from './6.png';
import photo7 from './7.jpg';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/getSuitableImageSize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function getSuitableImageSize(
height = autoHeight;
}
// 长图模式
else if (naturalHeight / naturalWidth > 3) {
else if (naturalHeight / naturalWidth >= 3) {
width = innerWidth;
height = autoHeight;
// 默认定位到顶部区域
Expand Down

0 comments on commit db0b998

Please sign in to comment.