hunthu2000 / gwt-cal

Automatically exported from code.google.com/p/gwt-cal
0 stars 0 forks source link

DayView.scrollToHour() scrolls too far #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Version: Trunk, rev 42
File: com/bradrydzewski/gwt/calendar/client/DayView.java
Method: scrollToHour()

dayView.scrollToHour(11);

Expected result; scroll down to 11 o'clock.
My result: scrolls all the way to the bottom of the time table.

There is an extra "hour" in the calculation made in DayView.scrollToHour().
This should work:

public void scrollToHour(int hour) {
        dayViewBody.getScrollPanel().setScrollPosition(hour *
getSettings().getIntervalsPerHour() * getSettings().getPixelsPerInterval());
}

Original issue reported on code.google.com by lunn...@gmail.com on 10 Jul 2009 at 1:36

GoogleCodeExporter commented 9 years ago
thanks for letting me know and providing the code fix! I'll incorporate in my 
next 
build

Original comment by Brad.Ryd...@gmail.com on 14 Jul 2009 at 4:58

GoogleCodeExporter commented 9 years ago
Fix applied and committed to trunk, thanks lunne82 for the help

Original comment by Brad.Ryd...@gmail.com on 16 Jul 2009 at 5:00

GoogleCodeExporter commented 9 years ago

Original comment by Brad.Ryd...@gmail.com on 21 Jul 2009 at 12:19