Issue with single fire detection of element sizes

Pretty much done with my project’s ground work, now going back on the list of things that were driving me up a wall, starting with this one: I have a function that checks the parent width–in this case window–and then goes through and has child elements match the parent width or be dividing up equally in width size based on that width.

The issue is that I need to fire the function twice as the image shows in the console. The first initialization does not get the accurate sizes. From what I understand of this it is because the first call works as though the vertical scroll bar exist when it does not. And sure enough, when shortening the browser height to trigger the scroll bar the first and second fire for ‘agility-box’ matched the window size.

This is an issue because there are other things in the function that relay on accurate width to calculate the height in a ratio. Wrong width, wrong height.

The call is under “svgInfrastructure Calls”.

If you guys need code I’ll throw it on here because it doesn’t make sense that I have to do with to clear the scroll width.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.