fix: issue with feature vertex being out of bound

This commit is contained in:
Azgaar 2024-09-25 17:05:31 +02:00
parent 949a486bf8
commit 84c326e347
4 changed files with 7 additions and 7 deletions

View file

@ -8039,7 +8039,7 @@
<script src="utils/stringUtils.js?v=1.99.00"></script>
<script src="utils/languageUtils.js?v=1.99.00"></script>
<script src="utils/unitUtils.js?v=1.99.00"></script>
<script src="utils/pathUtils.js?v=1.104.0"></script>
<script src="utils/pathUtils.js?v=1.105.6"></script>
<script defer src="utils/debugUtils.js?v=1.99.00"></script>
<script src="modules/voronoi.js"></script>
@ -8065,7 +8065,7 @@
<script src="libs/alea.min.js?v1.105.0"></script>
<script src="libs/polylabel.min.js?v1.105.0"></script>
<script src="libs/lineclip.min.js?v1.105.0"></script>
<script src="libs/simplify.js?v1.105.0"></script>
<script src="libs/simplify.js?v1.105.6"></script>
<script src="modules/fonts.js?v=1.99.03"></script>
<script src="modules/ui/layers.js?v=1.101.00"></script>
<script src="modules/ui/measurers.js?v=1.99.00"></script>

View file

@ -42,8 +42,9 @@
const newPoints = [prevPoint];
let point;
for (let i = 1, len = points.length; i < len; i++) {
for (let i = 1; i < points.length; i++) {
point = points[i];
if (!point) continue;
if (getSqDist(point, prevPoint) > sqTolerance) {
newPoints.push(point);
@ -51,8 +52,7 @@
}
}
if (point && prevPoint !== point) newPoints.push(point);
if (prevPoint !== point) newPoints.push(point);
return newPoints;
}

View file

@ -158,7 +158,7 @@ function connectVertices({vertices, startingVertex, ofSameType, addToChecked, cl
else if (v2 !== previous && c2 !== c3) next = v2;
else if (v3 !== previous && c1 !== c3) next = v3;
if (!vertices.c[next]) {
if (next >= vertices.c.length) {
ERROR && console.error("ConnectVertices: next vertex is out of bounds");
break;
}

View file

@ -12,7 +12,7 @@
*
* Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2
*/
const VERSION = "1.105.5";
const VERSION = "1.105.6";
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
{