mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-18 10:51:54 +02:00
Merge branch 'image-view-zoom' of https://github.com/SimonBrandner/matrix-react-sdk into image-view-zoom
This commit is contained in:
commit
53e8b5e6af
@ -104,7 +104,7 @@ export default class ImageView extends React.Component<IProps, IState> {
|
|||||||
// We have to use addEventListener() because the listener
|
// We have to use addEventListener() because the listener
|
||||||
// needs to be passive in order to work with Chromium
|
// needs to be passive in order to work with Chromium
|
||||||
this.focusLock.current.addEventListener('wheel', this.onWheel, { passive: false });
|
this.focusLock.current.addEventListener('wheel', this.onWheel, { passive: false });
|
||||||
// We want to recalculate zoom whenever the windows size changes
|
// We want to recalculate zoom whenever the window's size changes
|
||||||
window.addEventListener("resize", this.calculateZoom);
|
window.addEventListener("resize", this.calculateZoom);
|
||||||
// After the image loads for the first time we want to calculate the zoom
|
// After the image loads for the first time we want to calculate the zoom
|
||||||
this.image.current.addEventListener("load", this.calculateZoom);
|
this.image.current.addEventListener("load", this.calculateZoom);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user