codeaudit / gwt-chronoscope

Automatically exported from code.google.com/p/gwt-chronoscope
GNU Lesser General Public License v2.1
1 stars 0 forks source link

Disabling overviewEnabled for a graph causes JS error with the onMouseOver event (under IE) #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a graph calling setOverviewEnabled(false)
2. Move the mouse on the plot with IE7
3. Observe the js error

After having looked into the code, I think the problem comes from the
OverviewAxisMouseMoveHandler class in the onMouseMove method.
Code is  Bounds overviewAxisBounds = overviewAxis.getBounds(); assuming
there is always an overviewAxis set but using the setOverviewEnabled(false)
causes the overviewAxis  to be null. Quick fix would be to handle the
possibility the overviewAxis is null in the method body.

Original issue reported on code.google.com by nlesc...@gmail.com on 19 Sep 2008 at 10:00

GoogleCodeExporter commented 9 years ago
Fixed in r355.  

Was able to replicate problem in r354.  Added isOverviewEnabled() to XYPlot and 
then added check in 
OverviewAxisMouseMoveHandler.onMouseMove() that returns immediately if overview 
axis not enabled 
(thanks nlescure for your thorough investigation!).

Ideally, we should be unregistering/registering OverviewAxisMouseMoveHandler as 
a chart event handler 
whenever overview axis is disabled/enabled.  But this will happen as part of a 
larger refactoring of the event 
handling framework.

Original comment by chadtaka...@gmail.com on 22 Sep 2008 at 10:48