Select to view content in your preferred language

Drawing polygon: behavior changed in v4.30

172
2
01-28-2025 06:37 AM
LittleTurtle
Occasional Contributor

Hello,

I have witnessed a changed in behavior between v4.29 and v4.30, if I try to draw a Polygon in 4.29, if there is only 2 vertices it draws a line between the 2 points.

In v4.30, it draws a point at equidistant from the 2 points.

You can test it here in 4.29, if you change the api to 4.30 you will see the difference

https://codepen.io/BigTurtle/pen/PwYVYWN

I can fix that by drawing a polyline instead of a polygon when there are 2 vertices but I would prefer just using polygon.

What do you think?

 

Tags (2)
0 Kudos
2 Replies
JoelBennett
MVP Regular Contributor

I see what you're talking about.  I use SketchViewModel in our applications to support user-drawn geometries, and it doesn't exhibit this behavior.  Perhaps your workflows are such that you could use it as an alternative to the Draw module.

LittleTurtle
Occasional Contributor

Hello Joel, right now I've decided to stay with the Draw module and to simply draw a line when there is under 2 points in the graphic ; but I think you are right, SketchViewModel is the preferable way to do it.

0 Kudos