rungwiroon / BlazorGoogleMaps

Blazor interop for GoogleMap library
MIT License
319 stars 102 forks source link

Incorrect Method Names and Calls for Polygon and Rectangle Drag Functionality #288

Closed cruiserkernan closed 9 months ago

cruiserkernan commented 9 months ago

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

Current Behavior

Steps to Reproduce

  1. Attempt to use SetDraggble or GetDraggble on a Polygon or Rectangle object.
  2. Observe the incorrect method names and the failure to correctly interact with the Google Maps API.

Suggested Fix

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


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 9 months ago

You are the first person here who wrote such detailed description and PR. Thank you https://www.nuget.org/packages/BlazorGoogleMaps/3.2.4