feedback-js-api-next icon indicating copy to clipboard operation
feedback-js-api-next copied to clipboard

Enhancement: Add support for snapping when drawing a `Rectangle` or a `Circle`

Open sebastianfrey opened this issue 2 years ago • 5 comments

Enhancement category MapView | SceneView

Enhancement short summary Add support for snapping when drawing a Rectangle or a Circle

Enhancement description When you start drawing a Rectangle or a Circle it would be nice, to have the ability to snap to already existing geometries.

Flow for Rectangle:

  1. User starts drawing a Rectangle.
  2. User hovers over geometry while snapping is activated and cursor snaps to a hovered vertex of the hovered geometry.
  3. User clicks, holds mouse down and drags cursor to other position and then finishes drawing the Rectangle.

Note: Snapping should also be possible for the second vertex of an extent.

Flow for Circle:

  1. User starts drawing a Circle.
  2. User hovers over geometry while snapping is activated and cursor snaps to a hovered vertex of the hovered geometry.
  3. User clicks, holds mouse down and drags cursor to other position and then finishes drawing the Circle.

Note: Snapping should also be possible for the circumference of the drawn Circle.

Severity Medium

Note: Snapping when drawing a Rectangle or a Circle was already possible in 3.x.

Screenshots If applicable, add screenshots to help explain the enhancement or suggestion.

API version (check your console)

  • Version: [e.g. ArcGIS API for JavaScript 4.23-next [Date: 20220131, Revision: a737470f]]

Additional context Add any other context about the enhancement or suggestion here.

sebastianfrey avatar Jun 03 '22 08:06 sebastianfrey

Hi JS Team,

Any feedback about this request ? It would be very useful and is the missing piece for one of our webapp (rectangle snapping in my case). Is it something you consider adding ? If yes, which milestone would it be ?

Thanks !

Biboba avatar Jun 16 '22 18:06 Biboba

Hello, thanks for the feedback. We have an internal enhancement to add support for this. We don't have a timeline for this yet, but appreciate the use case examples. Will add them to our internal issue.

Thanks!

banuelosj avatar Jun 16 '22 18:06 banuelosj

Thanks for your reply @banuelosj.

My use case is drawing "server rack" rectangle with proper dimensions and topology. As they are generally one next to another, it would be great for topology purpose to snap it to its neighbour.

Thanks for listening !

Biboba avatar Jun 16 '22 18:06 Biboba

Yes, great example. We also have an enhancement request to add snapping while actively moving polygons or polyline in transform mode. Both are completely valid, and we intend to add these requests.

Thanks again!

banuelosj avatar Jun 16 '22 19:06 banuelosj

@Biboba Thanks for pushing that feature.

@banuelosj Looking forward when that feature gets implemented. It would enable us to support our customers with same experience as in our legacy 3.x application.

My concrete use case is drawing different geometric characteristics (circles) of wind energy plants, which have to be centered exactly along a wind energy plants center.

sebastianfrey avatar Jun 16 '22 19:06 sebastianfrey

Closing as there is an internal enhancement already for this issue.

banuelosj avatar Oct 05 '22 18:10 banuelosj