How to use bidirectional List?
MhhhxX opened this issue · comments
I'm trying to use the List UI component but I have troubles with it. I tried to code something similar to the storybook here with rectangles in the list:
let container = new Container();
let g = new Graphics().beginFill("black", 0.1).drawRect(0,0,540, 600);
let list: List = new List();
g.addChild(list);
list.addChild(new Graphics().beginFill("red").drawRect(0,0, 540 / 2, 100));
list.addChild(new Graphics().beginFill('blue').drawRect(0,0,400, 100));
container.addChild(g);
I expected a bidirectional layout where the blue rectangle is under the red one because I didn't specify the type ListOption
and the blue rectangle is too wide to fit in its parent but it always ends up in a horizontal layout like this:
Do you know what I'm doing wrong?
Thank you for the fix!
I really would like to test it. I tried to add your library with the latest commit on master to my package.json file but it doesn't work:
"dependencies": {
"pixi.js": "7.2.4",
"@pixi/ui": "https://github.com/pixijs/ui/tarball/master"
},
It says @pixi/ui not found when I need to import something.
Can you please give me some hints how to include the latest version to my project?
Made a patch version for you. You can use v0.7.1
Thank you very much!!
No problem. Thank you for catching the bug ;)