rungwiroon/BlazorGoogleMaps

Incorrect Method Names and Calls for Polygon and Rectangle Drag Functionality

cruiserkernan opened this issue · 1 comments

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 and GetDraggable.
  • They should correctly call the corresponding Google Maps API methods for enabling and checking draggable functionality.

Current Behavior

  • The method names are SetDraggble and GetDraggble.
  • They call "setDraggble" and "getDraggble" on the Google Maps object, which are non-existent methods in the Google Maps API.

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

  • Rename the methods to SetDraggable and GetDraggable.
  • Ensure the correct Google Maps API methods are being called, i.e., setDraggable and getDraggable.

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.

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