Giter VIP home page Giter VIP logo

Comments (11)

Joe-Palmer avatar Joe-Palmer commented on August 22, 2024 1

It is now possible to manage the viewport manually in v2.5.0 by passing viewport: false in the configuration. This should allow you to implement your own solution with bespoke behaviour so we can probably close this issue now.

from scream.

gajus avatar gajus commented on August 22, 2024

What is the reason you want to use Scream then?

from scream.

baptistebriel avatar baptistebriel commented on August 22, 2024

I'd like to use the viewchange event to basically know if it's in minimal view or not and then set an element to the real viewport size with scream.getMinimalViewSize();

from scream.

gajus avatar gajus commented on August 22, 2024

Is Brim not more suitable for what you do?

from scream.

baptistebriel avatar baptistebriel commented on August 22, 2024

Not really; I don't want to have a layer element on top of everything. I just want to subscribe to the viewchange event so I could grab the real, updated viewport size without the navigation bar.

from scream.

gajus avatar gajus commented on August 22, 2024

Sorry, I got lost myself between two projects. You are right, you should be using Scream.

However, sadly the current implementation starts managing viewport tag upon initiation,

scream.updateViewport();

I would accept a PR that makes viewport managing an opt-in, but I don't have time at the moment to update Scream myself.

from scream.

besserwisser avatar besserwisser commented on August 22, 2024

I also just want to know if I am in minimal view or not. Changing the scale breaks my application... Have your find a way to make it work @baptistebriel ?

from scream.

tmaximini avatar tmaximini commented on August 22, 2024

same use case for me, I don't want to update the meta tag, just detect if I am in minimal view or not. any solution here?

from scream.

gajus avatar gajus commented on August 22, 2024

same use case for me, I don't want to update the meta tag, just detect if I am in minimal view or not. any solution here?

A PR would be welcome.

from scream.

Joe-Palmer avatar Joe-Palmer commented on August 22, 2024

I tried to allow the viewpoint to not be set but unfortunately the calculations for minimal view do not work in most cases when it is not set. I did however take into account the safe area for the iPhone X so the content doesn't clash with the notch when horizontal: #24

from scream.

Joe-Palmer avatar Joe-Palmer commented on August 22, 2024

On reflection, it is perfectly possible to manage the viewport manually in a way that the minimal view calculations still work. This provides much more flexibility, especially with devices that have a notch, so I have added the ability to disable viewport management to PR #24

from scream.

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.