-
Notifications
You must be signed in to change notification settings - Fork 409
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
Add support for ImageButton in ZoomToMaxExtentButton component #271
Conversation
I improve a little bit (I hope) the ImageButton component: remove the div around the image tag and give the possibility to pass a custom style. I upgraded and updated all the need tests. I also give the possibility to the ZoomExtendButton component to support an ImageButton (the same behavior as the InfoButton). |
}, | ||
getStyle() { | ||
var style = { | ||
var finalStyle = { | ||
cursor: "pointer", | ||
margin: 0, | ||
padding: 0, | ||
display: "inline-block" | ||
}; | ||
if (this.props.image && this.props.image !== "") { |
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.
this is equivalent to: if(this.props.image) {
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 will change that :)
By the way, a pattern is emerging for the buttons: being a normal (bootstrap) button or an image button. If this is a correct pattern\behavior we should probably find a way to put this in a reusable component, the last time I looked around mixins are the cools for this stuff. |
Unfortunately, mixins are deprecated, since they cannot be used with ES6 classes. |
Remove div around the image in ImageButton component
29a69a3
to
a50ec59
Compare
Good point, I was looking at the problem in a wrong way. Behavior and UI in the same place is not a good idea. Thank you. |
Add support for ImageButton in ZoomToMaxExtentButton component
…ons-it#274 remove widget (geosolutions-it#275) * Fix geosolutions-it#271 AutoResourceUpdate implementation * Update context as well and others * updating epics logic for ignoring execution based on options * Update pr with changes to plugin config * update revision including fix for geosolutions-it#10622
…not trigger http requests (geosolutions-it#278) * Update of epics to correctly update urls and not trigger http requests * optimize logic to migrate
* Fix geosolutions-it#271 updating config files * Update configs/localConfig.json Co-authored-by: Tobia Di Pisa <[email protected]> * Update configs/new.json Co-authored-by: Tobia Di Pisa <[email protected]> * update urls * Fix url config and reordering --------- Co-authored-by: Tobia Di Pisa <[email protected]>
Remove div around the image in ImageButton component