-
Notifications
You must be signed in to change notification settings - Fork 87
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
Allow overwriting of map_tooltip and map_crosshair #2835
Allow overwriting of map_tooltip and map_crosshair #2835
Conversation
/** | ||
* Sets the map crosshair to the center (or the map center if nothing provided). | ||
* Overwrites an existing map crosshair. | ||
* @param {?ol.Coordinate|undefined} center Optional center coordinate. |
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.
Instead of having {?ol.Coordinate|undefined}
use {?ol.Coordinate=}
an rename the parameter to opt_center
.
This is the standard way for optional parameter with the closure compiler.
* Sets the map tooltip to the center (or the map center if nothing provided). | ||
* Overwrites an existing map tooltip. | ||
* @param {string} tooltipText Text to display in tooltip. | ||
* @param {?ol.Coordinate|undefined} center Optional center coordinate. |
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 remark as above
* Sets the map crosshair to the center (or the map center if nothing provided). | ||
* Overwrites an existing map crosshair. | ||
* @param {?ol.Coordinate|undefined} center Optional center coordinate. | ||
* @export |
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.
If this function is not used in a html template, the @export
is not needed
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 very good ! Thanks
please merge if you think it's ready |
* Add setter for map crosshair * Add setter for tooltip
No description provided.