Skip to content

Commit

Permalink
revert PR #3679 as it causes regression
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Mar 26, 2023
1 parent f14687b commit f0e1114
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/modules/Markers.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,8 @@ export default class Markers {
)
}

if (typeof w.globals.pointsArray[seriesIndex] === 'undefined')
w.globals.pointsArray[seriesIndex] = []

if (Array.isArray(p.x)) {
for (let q = 0; q < p.x.length; q++) {
w.globals.pointsArray[seriesIndex].push([p.x[q], p.y[q]])

if (
p.x[q] < 0 ||
p.x[q] > w.globals.gridWidth ||
p.y[q] < 0 ||
p.y[q] > w.globals.gridHeight
) {
continue
}

let dataPointIndex = j

// a small hack as we have 2 points for the first val to connect it
Expand Down Expand Up @@ -143,6 +129,12 @@ export default class Markers {
if (elPointsWrap) {
elPointsWrap.add(point)
}
} else {
// dynamic array creation - multidimensional
if (typeof w.globals.pointsArray[seriesIndex] === 'undefined')
w.globals.pointsArray[seriesIndex] = []

w.globals.pointsArray[seriesIndex].push([p.x[q], p.y[q]])
}
}
}
Expand Down

1 comment on commit f0e1114

@junedchhipa
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

causes #3731

Please sign in to comment.