hunthu2000 / gwt-cal

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

Creating appointment on monthview #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

Since revision 161, it's possible on 0.9 to create appointments from the
dayview, I started a patch to do the same on monthview (see attachement),
but I have some problems, the following chunk of code return different
values for (col, row) if I click on the top-left or the bottom-right of a cell:

int col = (int)Math.floor( (x * DAYS_IN_A_WEEK)
                         / monthCalendarGrid.getOffsetWidth() );
int row = (int)Math.floor( (y * monthViewRequiredRows) 
                         / monthCalendarGrid.getOffsetHeight() )+1;

Hence the computed date that follow is not correct. Where am I wrong ?

On a side note I don't know if (line 20 of the patch):

clickedElement == appointmentCanvas.getElement()

is relevant there.

Original issue reported on code.google.com by bertrand...@gmail.com on 9 Dec 2009 at 3:22

Attachments:

GoogleCodeExporter commented 9 years ago
I added in the TimeBlockClickEvent to the MonthView, r217

Original comment by Brad.Ryd...@gmail.com on 20 Dec 2009 at 8:00

GoogleCodeExporter commented 9 years ago

Original comment by Brad.Ryd...@gmail.com on 12 May 2010 at 7:08