Hello,
I am trying to draw a rectangle on a SceneView with SketchViewModel and have it be scaleable as in this example: https://developers.arcgis.com/javascript/latest/sample-code/sketch-geometries/
When I attempt to use the "transform" tool on the graphic in my SceneView, the scaling handles do not appear.
On the example, I can transform like this:
Here is the code I'm using:
const graphicsLayer = new modules.GraphicsLayer()
view.map.layers.add(graphicsLayer)
const sketch = new SketchViewModel({ view, layer: graphicsLayer, defaultUpdateOptions: { tool: 'transform' } })
const polygonSymbol = {
type: 'simple-fill',
color: [150, 150, 150, 0.2],
outline: {
color: [255, 0, 0],
width: 2
}
}
sketch.set('polygonSymbol', polygonSymbol)
sketch.create('rectangle', { hasZ: false })
Is there something I'm missing?
Solved! Go to Solution.
@avecchi ,
The "transform" behavior got changed with introducing "Line and polygon transformations" in 4.19 for 3D. This was not possible with 3D before but in 2D. Check also the release notes: https://developers.arcgis.com/javascript/latest/4.19/.
So it looks like you are working with 4.18 or below?
Thanks,
Sascha
@avecchi ,
Could you please provide a codepen or something similar to view a test app that reproduces this issue? I was unable to reproduce this with the code you provided and I tested with versions 4.19 - 4.21. What version of the JSAPI are you seeing this, and have you tested with different versions of the API and are able to reproduce as well?
Thanks,
Jose
@avecchi ,
The "transform" behavior got changed with introducing "Line and polygon transformations" in 4.19 for 3D. This was not possible with 3D before but in 2D. Check also the release notes: https://developers.arcgis.com/javascript/latest/4.19/.
So it looks like you are working with 4.18 or below?
Thanks,
Sascha
That was it! Thank you so much!