Please be aware there is a known issue with images on the Community. We are working to resolve this issue as quickly as possible. We apologize for the inconvenience. If you need urgent help in the meantime, please reach out to technical support or your Threekit representative.

Resize ThreeKit player?

Comments

4 comments

  • aaronlayton
    aaronlayton

    Is there a way to trigger a resize for the ThreeKit player?

    By default it seems to be taking up the full width and height of my container which is great when resizing larger, but when I resize to a smaller dimension my container cannot go smaller because the threekit player takes up a set defined width

    0
  • Ian  Drews
    Ian Drews

    Hi Aaron,
    apologies if I’m misunderstanding your question, the player can be resized with CSS targeting the div that the player is attached to.

    Ian

    0
  • aaronlayton
    aaronlayton

    Hiya Ian,

    If the player is in a container that fills up the width of its parent then it never shrinks down because the canvas gets a set width and height from JS.

    The results is the container div cannot go smaller because a child elm has a set size.

    0
  • William  Thompson
    William Thompson

    Hi Arron, I’m not sure I’m following your issue. When you initialize the player, you target a div:

    el: document.getElementById("player")
    

    You should give that div style in order to make the player responsive to different screen sizes. If you have tried that and it doesn’t work, can you provide a code snippet of how your divs are laid out and their styles?

    It sounds like there is a style conflict somewhere preventing the player to resize - it typically resizes on its own or based on the styles applied to it.

    0

Please sign in to leave a comment.

Powered by Zendesk