0
0
Fork 0

Add expand/compress image button on image view box (#15068)

* add zoom image button

* enhance zoom algorithm & add translation

* code structure

* code structure

* code structure

* enhance grab performance

* rm useless state

* fix behavior on Firefox & scroll lock & horizontal scroll with mousewheel

* remove scroll lock on MouseWheelEvent

* code structure

* enhance algorithm and code structure

* rm Gemfile.lock from tree

* codeclimate

* fix a stupid mistake
This commit is contained in:
Mashiro 2020-11-03 04:16:38 +08:00 committed by GitHub
parent 4b2ec4a2dc
commit 6a2db10f76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 2029 additions and 23 deletions

View file

@ -13,6 +13,7 @@ export default class ImageLoader extends React.PureComponent {
width: PropTypes.number,
height: PropTypes.number,
onClick: PropTypes.func,
zoomButtonHidden: PropTypes.bool,
}
static defaultProps = {
@ -151,6 +152,9 @@ export default class ImageLoader extends React.PureComponent {
alt={alt}
src={src}
onClick={onClick}
width={width}
height={height}
zoomButtonHidden={this.props.zoomButtonHidden}
/>
)}
</div>