Comments (11)
Fixed in # v2.2.3.
from react-viewer.
try v2.2.4 😆
from react-viewer.
This problem replay if i open viewer, edit image(rotate, scale-mouse well, flip) and when i edit i have many warnings
from react-viewer.
Very big problem - when i close viewer, send warning dont stop. Plz add on componentUnmount unsubscribe eventListener mouse and another events
from react-viewer.
Can you provide a reproduce demo, let me check better.
from react-viewer.
https://monosnap.com/file/nnpjJHPbWKzazrESpXpmQemStU55TW
What i do:
- Open viewer with image
- Some action
- Close viewer
- Any mouse scroll create many warning this setState on unmount component
- Open viewer again
- Some action create many warning this setState on unmount component
- Close viewer
- Very more warnings.
- If many repeat "open - some actions - close" create very big flow warnings multiplication on count repeat
from react-viewer.
Can you provide a small code demo, I can`t reappear this bug.
from react-viewer.
it's all,
I inject Viewer if need, and remove it if not need now
showViewer = () => {
let images =
this.props[`${this.props.type}Items`]
.map((item) => ({
src: this.downloadLink(item.id),
alt: item.name
}))
return (
<Viewer
visible
onClose={() => { this.setState({ mode: GALLERY }) }}
images={images}
activeIndex={this.state.attachmentIndex}
/>)
}
from react-viewer.
Hi, @infeng please remove listener onResize after unmount
from react-viewer.
@Toxblh you are right.
from react-viewer.
All good, nice work) xD
Thank you
from react-viewer.
Related Issues (20)
- some personal suggestions
- Can't remove overlay
- Clicking next piece does not work
- Prop totalName doesn't in `master` branch
- Questions about Zoom in status indicator
- 当图片加载完成以及缩放时,能不能给个回调props,获取当前图片的缩放比例以及加载完成情况?
- I want to increase the image rotation angle
- 支持移动端的手指控制缩放和拖动么
- react-viewer-transition动画取消 HOT 1
- Drag functionality on mobile devices
- How to display format tif
- How to Blur the image
- Remote image with content-type: image/jpeg is not downloading.Only opens in new tab
- Getting reference Error : document is not defined HOT 1
- Can you create a separate NPM package for Nextjs ?
- document is not defined in next js HOT 1
- Do you consider working outside the iframe
- When the container is window. top. document. body and the drag registration event document object is incorrect, it should be window. top. document
- inline mode loading still uses window.innerHeight
- Close overlay on click outside image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-viewer.