-
Notifications
You must be signed in to change notification settings - Fork 148
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
Move options for ornaments into individual structs #318
Conversation
…#307) * Expose computed vars for operators + arguments of expressions * Support string based arrays as valid expression argument * Refactor ExpressionBuilder * review comment * cleanup Remove check for iOS 11 Update LogoView to make class and properties internal Update OrnamentsManager.options documentation Updated the changelog Remove options parameter from MapConfig.setupOrnaments() Updated changelog to note that MapView.update no longer used for ornaments
/// The default value for this property is `CGPoint(x: 8.0, y: 8.0)`. | ||
public var margins: CGPoint = defaultOrnamentsMargin | ||
/// The default value for this property is `.adaptive`. | ||
public var visibility: OrnamentVisibility = .adaptive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like visibility is consistent as a property, we should add that as part of the BaseOrnamentOptions
protocol
/// The default value for this property is `CGPoint(x: 8.0, y: 8.0)`. | ||
public var margins: CGPoint = defaultOrnamentsMargin | ||
/// The default value for this property is `true`. | ||
public var _isVisible: Bool = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't we use OrnamentVisibility
here and make it conform to BaseOrnamentOptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we originally used a BOOL
here because these two ornaments wouldn't ever have .adaptive
visibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we can control that right? Should the user not be allowed to change that configuration?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can label that as tailwork, since it may require more discussion.
/// The default value for this property is `CGPoint(x: 8.0, y: 8.0)`. | ||
public var margins: CGPoint = defaultOrnamentsMargin | ||
/// The default value for this property is `true`. | ||
public var _isVisible: Bool = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as AttributionButtonOptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make a follow up ticket for tailwork
PRs must be submitted under the terms of our Contributor License Agreement CLA.
Fixes: < Link to related issues that will be fixed by this pull request, if they exist >
Pull request checklist:
mapbox-maps-ios
changelog:<changelog></changelog>
.Summary of changes
This PR breaks the different ornament options into separate structs, which are then accessed via properties on OrnamentOptions. Therefore,
OrnamentOptions.scaleBarVisibility
becomesOrnamentOptions.scaleBar.visibility
.User impact (optional)