Jump to content

pixi-ui ScrollingContainer can't add Container


Recommended Posts

I'm trying to execute this simple code:

var scrollingContainer = new PIXI.UI.ScrollingContainer({ scrollY: true, width: 100, height: 200 });

this.scrollingContainer.addChild(new PIXI.Container());


The last line throws an error:


Container.js:70 Uncaught TypeError: Cannot read property 'parent' of undefined
    at Container.addChild (Container.js:70)
    at ScrollingContainer.UIBase.addChild (UIBase.js:321)
    at ScrollingContainer.addChild (ScrollingContainer.js:103)


If I try to add a sprite instead of a container, everything works as expected - no errors are thrown.


I also created an issue in the repo:




Solved in the github issue.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...