Incorrect Method Names and Calls for Polygon and Rectangle Drag Functionality
cruiserkernan opened this issue · 1 comments
cruiserkernan commented
Description
There is a typo in the method names and Google Maps method calls for handling drag functionality in the Polygon
and Rectangle
classes. The methods SetDraggble
and GetDraggble
are incorrectly named and are calling the wrong Google Maps methods.
Expected Behavior
- The methods should be correctly named as
SetDraggable
andGetDraggable
. - They should correctly call the corresponding Google Maps API methods for enabling and checking draggable functionality.
Current Behavior
- The method names are
SetDraggble
andGetDraggble
. - They call
"setDraggble"
and"getDraggble"
on the Google Maps object, which are non-existent methods in the Google Maps API.
Steps to Reproduce
- Attempt to use
SetDraggble
orGetDraggble
on aPolygon
orRectangle
object. - Observe the incorrect method names and the failure to correctly interact with the Google Maps API.
Suggested Fix
- Rename the methods to
SetDraggable
andGetDraggable
. - Ensure the correct Google Maps API methods are being called, i.e.,
setDraggable
andgetDraggable
.
Additional Information
This issue affects the usability of draggable shapes in the BlazorGoogleMaps library, and a prompt fix would enhance the functionality significantly.
Example of Incorrect Code
/// <summary>
/// Returns whether this shape can be dragged by the user.
/// </summary>
/// <returns></returns>
public Task<bool> GetDraggble()
{
return _jsObjectRef.InvokeAsync<bool>(
"getDraggble");
}
Potential Impact
- This typo might lead to runtime errors or non-functional drag features for shapes.
- Developers using this library would have to implement workarounds or wait for a fix.
I am willing to contribute to the resolution of this issue and will submit a pull request with the necessary changes.
Thank you for your attention to this matter.
valentasm1 commented
You are the first person here who wrote such detailed description and PR.
Thank you
https://www.nuget.org/packages/BlazorGoogleMaps/3.2.4