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:
parent
4b2ec4a2dc
commit
6a2db10f76
79 changed files with 2029 additions and 23 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue