Skip to content
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 rectangle as custom mode #247

Merged
merged 2 commits into from
Mar 8, 2023

Conversation

VijayanB
Copy link
Member

@VijayanB VijayanB commented Feb 14, 2023

Description

Mapbox-gl-draw doesn't support rectangle natively, but supports an option to add custom mode.
This PR will create new custom mode using types available for extension. This is typescript version of same
mode that is available in geojson.io.

  • Adds rectangle as custom mode

Issues Resolved

#213

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@VijayanB VijayanB self-assigned this Feb 14, 2023
@VijayanB VijayanB requested a review from a team February 14, 2023 07:36
@codecov-commenter
Copy link

codecov-commenter commented Feb 14, 2023

Codecov Report

Merging #247 (1583f81) into main (eb0bc0d) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main     #247   +/-   ##
=======================================
  Coverage   85.00%   85.00%           
=======================================
  Files          14       14           
  Lines         400      400           
  Branches       57       57           
=======================================
  Hits          340      340           
  Misses         43       43           
  Partials       17       17           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@VijayanB VijayanB changed the title Add rectangle mode Add draw custom mode Feb 15, 2023
@VijayanB VijayanB force-pushed the add-rectangle-mode branch 2 times, most recently from f60372b to aff81a7 Compare February 15, 2023 01:20
@VijayanB VijayanB marked this pull request as draft March 1, 2023 22:34
Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
@VijayanB VijayanB marked this pull request as ready for review March 8, 2023 06:32
New draw mode that extends polygon but behaves
like rectangle.

On First click, coordinate is set. On Second click the rectangle
is created as bounding box. This will be used for
drawing bounding box.

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
@VijayanB VijayanB changed the base branch from feature/draw-filter-control to main March 8, 2023 06:34
@VijayanB VijayanB added v2.7.0 enhancement New feature or request labels Mar 8, 2023
@VijayanB VijayanB changed the title Add draw custom mode Add rectangle as custom mode Mar 8, 2023
@VijayanB VijayanB merged commit 7a53e13 into opensearch-project:main Mar 8, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 23, 2023
* Add dependency to mapbox-gl-draw
* Add rectangle mode

New draw mode that extends polygon but behaves
like rectangle.

On First click, coordinate is set. On Second click the rectangle
is created as bounding box. This will be used for
drawing bounding box.

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
(cherry picked from commit 7a53e13)
VijayanB pushed a commit that referenced this pull request Mar 23, 2023
* Add dependency to mapbox-gl-draw
* Add rectangle mode

New draw mode that extends polygon but behaves
like rectangle.

On First click, coordinate is set. On Second click the rectangle
is created as bounding box. This will be used for
drawing bounding box.

Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants