Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Why is subview width a negative value? #3

Open
trusktr opened this issue Mar 3, 2019 · 0 comments
Open

Why is subview width a negative value? #3

trusktr opened this issue Mar 3, 2019 · 0 comments

Comments

@trusktr
Copy link

trusktr commented Mar 3, 2019

I've been working on #2. I haven't changed any of your logic, the only difference is that I'm applying the view dimensions to my own nodes instead of famous nodes. But otherwise, all logic is identical.

Any ideas why the width of one subview is coming negative? This throws my size calculations bonkers. I could probably guard my renderables against it by clamping to 0, but I'm just curious why subView.width may be a negative value.

Basically here:

node.setAbsoluteSize(
(widths && (widths[key] === true)) ? undefined : subView.width,
(heights && (heights[key] === true)) ? undefined : subView.height
);

Any insights as to what can lead subView.width be a negative number?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant