Esri / feedback-js-api-next

Try out the next release of the ArcGIS Maps SDK for JavaScript and share your feedback. Be warned: this release is still in development and is unstable.
87 stars 23 forks source link

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

Closed sebastianfrey closed 2 years ago

sebastianfrey commented 2 years ago

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)

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

Biboba commented 2 years ago

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 !

banuelosj commented 2 years ago

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!

Biboba commented 2 years ago

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 !

banuelosj commented 2 years ago

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!

sebastianfrey commented 2 years ago

@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.

banuelosj commented 2 years ago

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