Add NewStyled method for creating a globe with a custom style - #7
Add NewStyled method for creating a globe with a custom style#7taywrobel wants to merge 2 commits into
Conversation
Introcues a new constructor function "NewStyled", which takes as a parameter a style and constructs an empty globe with that style. This gives control over controls in the style object which aren't accessible by default or by using Options.
|
@twrobel3 thanks for the pull request! I wonder about using the functional options pattern. In this case you could change It's a bit late now but I wish I had distinguished between "style" options and constructor options. |
|
I agree that "style" options are semantically different than some of the other options used. The inspiration here was that I didn't see any good way way to change the background color of the rendering without changing the DefaultStyle struct. The |
Introduces a new constructor function "NewStyled", which takes as a
parameter a style and constructs an empty globe with that style.
This gives control over controls in the style object which aren't
accessible by default or by using Options, and without changing
the DefaultStyle, which is globally scoped and may have unintended
side effects if changed.