nwixsom / gwt-cal

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

OpenEventhould support Mouse location s. #100

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be great if passed the mouse location of where the click actually 
occurred, which would help to set the pop up location. OpenEvent might not be a 
part of gwt-cal code, but it could be probably extended by a specific handler. 

Original issue reported on code.google.com by pulastya...@gmail.com on 25 Nov 2010 at 3:58

GoogleCodeExporter commented 9 years ago
One option, 

Keep the variables to capture the mouse position in the addMouseOverHandler, 
then use the above position variables to align your popup

int left =0;
int top = 0;

        calendar.addMouseOverHandler(new MouseOverHandler<AppointmentInCalendar>() {
            @Override
            public void onMouseOver(MouseOverEvent<AppointmentInCalendar> event) {
                Element element = (Element) event.getElement();

                left = element.getAbsoluteLeft() + 10;
                top = element.getAbsoluteTop() + 10;
            }
        });

Original comment by info2...@gmail.com on 17 Dec 2010 at 7:50

GoogleCodeExporter commented 9 years ago

Original comment by Brad.Ryd...@gmail.com on 2 May 2013 at 8:35