-
Notifications
You must be signed in to change notification settings - Fork 7
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
CustomControl Buttons are rePostioned! cant have different positions of multiple buttons! #127
Comments
Hello, if you change your code to gmaps.addCustomControls(new CustomControl(button2, ControlPosition.TOP_CENTER),new CustomControl(button1, ControlPosition.BOTTOM_CENTER)); it works as expected. We understand that calling the method "addCustomControls" can be confusing so we're discussing to make a change in order to have a "setCustomControls" instead, to set the list of custom controls. |
I will test your solution, however, |
Those requirements will require some investigation. I will create a new issue in order to address them. I will move forward with the update on the original reported issue. |
Here's the new issue #128. @JariHanah could you add there any additional information about your use case and expected behavior? Thanks. |
Use setCustomControls instead. Close #127
I think a setCustomButtons and removeCuustomButtons would solve my issues,
|
what I did to solve the problem, extending the CustomControl class,
|
Use setCustomControls instead. Close #127
So I tried the new method of setCustomControls for the latest version of 1.13.0 it still acts like an addCustomControls which is deprecated. what was this issue supposed to solve? My Prevoius code shows how my setCustomControls work by removing the previous controls, then applying a new set of controls. |
Hello @JariHanah as mentioned in this comment #127 (comment) this ticket would only address the update of addCustomControls to setCustomcontrols without any other change, which fixes the original reported issue. That comment also mentioned that removing or adding controls dynamically is something that needs investigation and a separate issue was created for that #128. We didn't have the change to work on that yet. Any new update regarding removing/adding dynamically will be done in that other issue. |
Describe the bug
I added multiple Custom Buttons inside maps using CustomControl,
All added buttons would be repositioned to the position of the last Button inserted.
Expected behavior
Each button should follow how we position it in code!
addCustomControls(new CustomControl(button1, ControlPosition.BOTTOM_CENTER));
addCustomControls(new CustomControl(button2, ControlPosition.TOP_CENTER));
button1 should be positioned bottom,
button2 should be positioned TOP
Minimal reproducible example
gmaps.addCustomControls(new CustomControl(button2, ControlPosition.TOP_CENTER));
gmaps.addCustomControls(new CustomControl(button1, ControlPosition.BOTTOM_CENTER));
Add-on Version
1.12.0
Vaadin Version
24
Additional information
The text was updated successfully, but these errors were encountered: