kensho-technologies / orama

Plug and play React charts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Brush crashes when mouse leaves and re-enters bounds

billyjanitsch opened this issue · comments

To reproduce, in the Brush sandbox example:

  1. Click and hold the brush
  2. Move the mouse outside of the brush bounds
  3. Move it back inside the bounds

Here's the stack trace:

Uncaught TypeError: Cannot read property 'x' of null
    at mouseDrag (Brush.js:108)
    at handleChart (Brush.js:169)
    at Object.onUpdate (Brush.js:198)
    at handleCanvasInput (index.js:34)
    at Object.onUpdate (index.js:68)
    at CanvasInput.<anonymous> (index.js:126)

Might have been introduced in 9c50642. @nabeel-, would you mind investigating?