Giter Site home page Giter Site logo

Comments (4)

h-ikeda avatar h-ikeda commented on September 21, 2024 1

This seems to be the problem.
https://stackoverflow.com/questions/6735022/remove-the-extra-whitespace-surrounding-iframes

It says the chrome makes an extra spaces above iframes because they are an inline element. Since VueGL detects the root element size via inner iframe, it calculates wrong canvas size and falls in infinity loop...

So adding line-height: 0; to the VueGL container can be a temporary solution.

main > div > *:first-child {
  line-height: 0;
  height: 100%;
}

VueGL should treat this in the future.

from vue-gl.

h-ikeda avatar h-ikeda commented on September 21, 2024

Unfortunately I haven't created fluid layout examples.

The "enough size constraints" means, properties those determine container width and height uniquely from the viewport size.
So you can use relative values like width: 50%;, flex boxes, ... but be careful when the calculated size depends on the inner contents.

Typically you should apply size related properties like width, height, flex-basis, flex-grow, ... they don't have to be fixed pixel sizes.

from vue-gl.

ErickPetru avatar ErickPetru commented on September 21, 2024

Thanks for your reply @h-ikeda, I was able to put it inside a fluid container with percentages. But I still wasn't able to use flex boxes in a hierarchical layout. Here's a fiddle showing the problem if you don't mind to give a look at.

from vue-gl.

h-ikeda avatar h-ikeda commented on September 21, 2024

New released version 1.x now renders a canvas as the component root element, not in the wrapper element.

To handle renderer's style or layout, notice that the rendered element is just a .

from vue-gl.

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.