Skip to content

Commit

Permalink
Merge pull request #3679 from leinonen/dont-render-markers-outside-gr…
Browse files Browse the repository at this point in the history
…aph-area

fix: don't render markers outside graph area
  • Loading branch information
junedchhipa committed Mar 3, 2023
2 parents d9c0455 + a5179b8 commit ea8ecaa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/modules/Markers.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ export default class Markers {

if (Array.isArray(p.x)) {
for (let q = 0; q < p.x.length; 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

0 comments on commit ea8ecaa

Please sign in to comment.