Commit Graph

16 Commits

Author SHA1 Message Date
Gregers Gram Rygg
97c793281f Subtract page scroll from button position, since clientX/Y is relative to the viewport not page 2013-02-11 16:32:38 +01:00
ahocevar
98569203a6 Check whether an event target should be considered for handling. 2012-08-01 10:20:25 +02:00
Éric Lemoine
e0b93c2e45 The OpenLayers code is published under the 2-clause BSD license 2012-03-30 08:33:55 +02:00
Éric Lemoine
650df2a8f1 change copyright header in every OpenLayers js file 2012-03-29 22:14:56 +02:00
Éric Lemoine
6a43fcaefc change buttonclick.getPressedButton depth value from 5 to 3, this allows buttons with grand children (2 levels) 2012-02-29 13:34:47 +01:00
Éric Lemoine
00909404ab [Event.buttonclick] make buttonclick work if target element is a child of the clicked button 2012-02-29 00:56:52 +01:00
Éric Lemoine
e551fc672c [Event.buttonclick] make buttonclick work on RETURN/SPACE keydown 2012-02-28 22:28:33 +01:00
ahocevar
a278986442 No additional events registered on the LayerSwitcher.
With the buttonclick event, we can also handle clicks on layer names and checkboxes/radiobuttons when they get the olButton class. To make this work on iOS, we have to add a check in buttonclick.js to handle the case where the event occurred on a text element (nodeType === 3).
2012-02-02 00:02:51 +01:00
Éric Lemoine
271e3b61bd Events.buttonclick should be part of the API 2012-01-31 17:07:47 +01:00
ahocevar
5a1378cdab Improved extension example docs and destroy method. 2012-01-22 21:30:41 +01:00
ahocevar
e7107b96cb Fixing PanZoomBar and Panel issues after #164.
For PanZoomBar, this fixes the slider behavior. Now the buttonclick listener argument also includes a buttonXY property, and PanZoomPanel does not need an Events instance for the zoombarDiv any more.
For Panel, this fixes events for panels outside the map. Just setting the element on the Events instance was no longer enough after e70569b2bb. Events::attachToElement is now used, and it needed to be modified to also work if the Events instance had no element previously.
Finally, I renamed the button property of the buttonclick listener argument to buttonElement, to not confuse it with the browser event button property, and added some more tests and documentation.
2012-01-22 21:30:40 +01:00
ahocevar
9f9feabfae Let's not over-engineer things (see #164). 2012-01-21 10:46:44 +01:00
ahocevar
1d4b68af7b Fixing docs. 2012-01-20 15:48:01 +01:00
ahocevar
e09ee34f23 Incorporate remaining review comments from @bartvde. 2012-01-20 14:18:15 +01:00
ahocevar
e70569b2bb Use event handling of OpenLayers.Event, not the native one.
Also includes some of the fixes suggested by @bartvde.
2012-01-20 14:17:56 +01:00
ahocevar
05de2b5109 Don't let button controls interfer with handlers.
This change involves removal of the map's eventsDiv and introduces an OpenLayers.Events.buttonclick component that adds a buttonclick event which makes sure that only events that are not related to clicking a button propagate. This allows button controls to be on the map's viewPortDiv again.
2012-01-20 03:37:11 +01:00