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

Bug: GraphicMover doesn't work in 3D #40

Closed yevhenii-username closed 4 years ago

yevhenii-username commented 4 years ago

Describe the bug GraphicMover doesn`t work as expected in 3D. method cloneMove in file drawUtils

To Reproduce Steps to reproduce the behavior:

  1. Go to https://jsfiddle.net/lukashenko/v4Lo6ypa/82/

  2. Click on object in a map and try to drag. In 2D It work correctly.

  3. Move to JS editor and change in 19 line

    const is2d = true;

    to

    const is2d = false;
  4. Run app

  5. Try repeat step 2.

  6. See error in console

    drawUtils.js:6 Uncaught TypeError: Cannot read property '0' of undefined
    at Object.m.cloneMove (drawUtils.js:6)
    at Object.d._dragHandler (GraphicMover.js:14)
    at GraphicMover.js:7
    at a._callback (dojo.js:1920)
    at b.a._handleEvent (dojo.js:1912)
    at Object.eventCallback (dojo.js:1908)
    at Object.f._doNewPropagation (dojo.js:1897)
    at Object.f._emitInputEvent (dojo.js:1896)
    at Object.f._emitInputEventFromSource (dojo.js:1896)
    at Object.f._onEventReceived (dojo.js:1892)

Expected behavior Must drug symbol without error in 3d.

Screenshots

image

Where problem MapView have fields

SceneView doesn' t have this properties and method cloneMove throw exception because transform and inverseTransform undefined.

If i add property value from 2D like

image

it will be work, but not correctly.

Browser

What's your OS?

API version

Video

https://easyupload.io/7mrzyu password: arcgis

SaschaBrunnerCH commented 4 years ago

Hi @LukashenkoEvgeniy - thank you for reporting. This is not a bug because GraphicMover is an undocumented feature and for MapView only. For undocumented features be aware that this may change without any advance notice. Your requirment can be achieved by using SketchViewModel

I updated your example with SketchViewModel and it works now in 2D and 3D: https://jsfiddle.net/7aw84dsu/1/

move_around_graphic