Closed samreid closed 10 years ago
Also, this may be a good situation to move the "bottom" argument into the options parameter, and use {left:50, scale:0.7} as the defaults.
I added 15 here instead of the call sites because it is the same in every call site, and it seemed easier to change in one place instead of many.
The 15 is just a slight offset to make the bottom of the head image align with the bottom of the screen in a browser. It kept changing every time Bryce updated the head image, so I wanted to have it easy to change in one place.
The bottom argument is expecting layoutBounds.bottom.
Another option would be to create a constant for the head offset and pass it from every call site. What do you think is best in this case?
Perhaps adding documentation and explanation as in your above comment in HeadNode would solve the problem.
Added documentation to HeadNode. Assigning to @samreid for review
The docs and parameter renaming look great, thanks! Closing.
I noticed this code in HeadNode:
The 15 seemed odd to me. Why is 15 added to the parameter? Why not move the 15 to the call site(s)?