Skip to content

Commit

Permalink
prevent overflow of markers
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed May 18, 2019
1 parent f8d29a5 commit 074beb6
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/modules/axes/Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,13 @@ class Grid {
const coreUtils = new CoreUtils(this)
coreUtils.getLargestMarkerSize()

let markerSize =
w.globals.markers.largestSize + w.config.markers.hover.sizeOffset + 1

if (markerSize < 10) markerSize = 10
let markerSize = w.globals.markers.largestSize + 1

gl.dom.elGridRectMarker = graphics.drawRect(
-markerSize * 2,
-markerSize * 2,
gl.gridWidth + markerSize * 4,
gl.gridHeight + markerSize * 4,
-markerSize,
-markerSize,
gl.gridWidth + markerSize * 2,
gl.gridHeight + markerSize * 2,
0,
'#fff'
)
Expand Down

0 comments on commit 074beb6

Please sign in to comment.