-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SequentialLayout can't be align to bottom #67
Comments
Nodes can't take true size, David Valdman is planing to fix that, also sequentialLayout calculates its on size from the content. so in a way that could be the true size, so if you set the direction X, then the width will be the sum of the item's with in that direction, and for the y so it will be the sum of the item's hight. |
Nodes? Isn't Seq.Layout a View? Well, I'm building a View which contains some surfaces with unknown amount of text, so they need to be "true" height. These surfaces are layout with Seq.Layout. And this Seq.Layout with the surfaces is supposed to be align to the bottom of the View. |
A View is basically a Node but its used to encapsulate a part of the render tree. |
Sorry, this isn't currently possible with |
I was able to do what you described, setting true size for hight on the surface, check this codepen if you interested, also if @dmvaldman wants to look at it to see if he has better way |
Ah nice trick. Yes that works for now. |
Thanks. Nice trick! I just found the google Group. I have some more important questions that would not be suitable to put as "issues" here, so I put them there under the name "Paul". It would be very nice to get some help there from you guys if you got the time. |
SequentialLayout behave unpredicted when it's origin: [0, 1] and when it's added to a align: [0, 1] node.
And direction: SequentialLayout.DIRECTION.Y
Even worse if items hight is set to TRUE.
In direction: SequentialLayout.DIRECTION.X everything is fine and acting as predicted.
var a1 = new Surface({ content: 'alt 1 ', size: [undefined, true], origin: [1, 1] }); var a2 = new Surface({ content: 'alt 2 ', size: [undefined, true], origin: [1, 1] }); var a3 = new Surface({ content: 'alt 3 ', size: [undefined, true], origin: [1, 1] }); var test = new SequentialLayout({ direction: SequentialLayout.DIRECTION.Y, spacing: 3, size: [true, true], origin: [1, 1] }); test.push(a1); test.push(a2); test.push(a3); var context = new Context(); context.add({align: [1, 1]}).add(test); // Mount the context to a DOM node context.mount(document.body);
The text was updated successfully, but these errors were encountered: