Coder Social home page Coder Social logo

updateSize() function about ng2-pdf-viewer HOT 7 CLOSED

vadimdez avatar vadimdez commented on May 24, 2024
updateSize() function

from ng2-pdf-viewer.

Comments (7)

VadimDez avatar VadimDez commented on May 24, 2024

Hi,
Which release do you mean?

from ng2-pdf-viewer.

Vi-dot avatar Vi-dot commented on May 24, 2024

I tried 1.0.1 and 1.0.2

from ng2-pdf-viewer.

Vi-dot avatar Vi-dot commented on May 24, 2024

In my case, pdf viewer is in a div resizable by user's hand (using angular-resizable-element). Then I need to call updateSize() manually.

from ng2-pdf-viewer.

VadimDez avatar VadimDez commented on May 24, 2024

Didn't have that case, but now with your example it makes sense.
updateSize() will be available in 2.0.0

from ng2-pdf-viewer.

Vi-dot avatar Vi-dot commented on May 24, 2024

Thanks :)

By the way, in this case, in a page with multiple splitted fragments, and one of them is pdf viewer :
The window resize event shloud be catch in main view to propagate to its children the right size they need.
But pdf viewer (a child of main view) already catch window resize event. It means that updateSize() is going to be called twice.
I wonder if it is the right way.

from ng2-pdf-viewer.

VadimDez avatar VadimDez commented on May 24, 2024

Yes, you're right, but for simplicity of this library i moved resize event inside the component.
Maybe need one more parameter to disable autoresize.

from ng2-pdf-viewer.

Vi-dot avatar Vi-dot commented on May 24, 2024

You're right, a parameter to disable autoresize is a good solution.

from ng2-pdf-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.