Giter Club home page Giter Club logo

Comments (11)

infeng avatar infeng commented on May 27, 2024 1

Fixed in # v2.2.3.

from react-viewer.

infeng avatar infeng commented on May 27, 2024 1

try v2.2.4 😆

from react-viewer.

Toxblh avatar Toxblh commented on May 27, 2024

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.

Toxblh avatar Toxblh commented on May 27, 2024

Very big problem - when i close viewer, send warning dont stop. Plz add on componentUnmount unsubscribe eventListener mouse and another events

from react-viewer.

infeng avatar infeng commented on May 27, 2024

Can you provide a reproduce demo, let me check better.

from react-viewer.

Toxblh avatar Toxblh commented on May 27, 2024

https://monosnap.com/file/nnpjJHPbWKzazrESpXpmQemStU55TW
What i do:

  1. Open viewer with image
  2. Some action
  3. Close viewer
  4. Any mouse scroll create many warning this setState on unmount component
  5. Open viewer again
  6. Some action create many warning this setState on unmount component
  7. Close viewer
  8. Very more warnings.
  9. If many repeat "open - some actions - close" create very big flow warnings multiplication on count repeat

from react-viewer.

infeng avatar infeng commented on May 27, 2024

Can you provide a small code demo, I can`t reappear this bug.

from react-viewer.

Toxblh avatar Toxblh commented on May 27, 2024

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.

Toxblh avatar Toxblh commented on May 27, 2024

Hi, @infeng please remove listener onResize after unmount

from react-viewer.

infeng avatar infeng commented on May 27, 2024

@Toxblh you are right.

from react-viewer.

Toxblh avatar Toxblh commented on May 27, 2024

All good, nice work) xD
Thank you

from react-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.