diff --git a/lib/OpenLayers/Control.js b/lib/OpenLayers/Control.js index a98cc00e3e..d1196f3c0e 100644 --- a/lib/OpenLayers/Control.js +++ b/lib/OpenLayers/Control.js @@ -78,6 +78,15 @@ OpenLayers.Control = OpenLayers.Class({ */ type: null, + /** + * Property: allowSelection + * {Boolean} By deafault, controls do not allow selection, because + * it may interfere with map dragging. If this is true, OpenLayers + * will not prevent selection of the control. + * Default is false. + */ + allowSelection: false, + /** * Property: displayClass * {string} This property is used for CSS related to the drawing of the @@ -240,6 +249,11 @@ OpenLayers.Control = OpenLayers.Class({ if (this.div == null) { this.div = OpenLayers.Util.createDiv(this.id); this.div.className = this.displayClass; + if (!this.allowSelection) { + this.div.className += " olControlNoSelect"; + this.div.setAttribute("unselectable", "on", 0); + this.div.onselectstart = function() { return(false); }; + } if (this.title != "") { this.div.title = this.title; } diff --git a/tests/BaseTypes/Bounds.html b/tests/BaseTypes/test_Bounds.html similarity index 100% rename from tests/BaseTypes/Bounds.html rename to tests/BaseTypes/test_Bounds.html diff --git a/tests/BaseTypes/Class.html b/tests/BaseTypes/test_Class.html similarity index 100% rename from tests/BaseTypes/Class.html rename to tests/BaseTypes/test_Class.html diff --git a/tests/BaseTypes/Element.html b/tests/BaseTypes/test_Element.html similarity index 100% rename from tests/BaseTypes/Element.html rename to tests/BaseTypes/test_Element.html diff --git a/tests/BaseTypes/LonLat.html b/tests/BaseTypes/test_LonLat.html similarity index 100% rename from tests/BaseTypes/LonLat.html rename to tests/BaseTypes/test_LonLat.html diff --git a/tests/BaseTypes/Pixel.html b/tests/BaseTypes/test_Pixel.html similarity index 100% rename from tests/BaseTypes/Pixel.html rename to tests/BaseTypes/test_Pixel.html diff --git a/tests/BaseTypes/Size.html b/tests/BaseTypes/test_Size.html similarity index 100% rename from tests/BaseTypes/Size.html rename to tests/BaseTypes/test_Size.html diff --git a/tests/Control/Attribution.html b/tests/Control/test_Attribution.html similarity index 100% rename from tests/Control/Attribution.html rename to tests/Control/test_Attribution.html diff --git a/tests/Control/Button.html b/tests/Control/test_Button.html similarity index 100% rename from tests/Control/Button.html rename to tests/Control/test_Button.html diff --git a/tests/Control/DragFeature.html b/tests/Control/test_DragFeature.html similarity index 100% rename from tests/Control/DragFeature.html rename to tests/Control/test_DragFeature.html diff --git a/tests/Control/DragPan.html b/tests/Control/test_DragPan.html similarity index 100% rename from tests/Control/DragPan.html rename to tests/Control/test_DragPan.html diff --git a/tests/Control/KeyboardDefaults.html b/tests/Control/test_KeyboardDefaults.html similarity index 100% rename from tests/Control/KeyboardDefaults.html rename to tests/Control/test_KeyboardDefaults.html diff --git a/tests/Control/LayerSwitcher.html b/tests/Control/test_LayerSwitcher.html similarity index 100% rename from tests/Control/LayerSwitcher.html rename to tests/Control/test_LayerSwitcher.html diff --git a/tests/Control/ModifyFeature.html b/tests/Control/test_ModifyFeature.html similarity index 100% rename from tests/Control/ModifyFeature.html rename to tests/Control/test_ModifyFeature.html diff --git a/tests/Control/MousePosition.html b/tests/Control/test_MousePosition.html similarity index 100% rename from tests/Control/MousePosition.html rename to tests/Control/test_MousePosition.html diff --git a/tests/Control/MouseToolbar.html b/tests/Control/test_MouseToolbar.html similarity index 100% rename from tests/Control/MouseToolbar.html rename to tests/Control/test_MouseToolbar.html diff --git a/tests/Control/NavToolbar.html b/tests/Control/test_NavToolbar.html similarity index 100% rename from tests/Control/NavToolbar.html rename to tests/Control/test_NavToolbar.html diff --git a/tests/Control/Navigation.html b/tests/Control/test_Navigation.html similarity index 100% rename from tests/Control/Navigation.html rename to tests/Control/test_Navigation.html diff --git a/tests/Control/NavigationHistory.html b/tests/Control/test_NavigationHistory.html similarity index 100% rename from tests/Control/NavigationHistory.html rename to tests/Control/test_NavigationHistory.html diff --git a/tests/Control/OverviewMap.html b/tests/Control/test_OverviewMap.html similarity index 100% rename from tests/Control/OverviewMap.html rename to tests/Control/test_OverviewMap.html diff --git a/tests/Control/PanZoom.html b/tests/Control/test_PanZoom.html similarity index 100% rename from tests/Control/PanZoom.html rename to tests/Control/test_PanZoom.html diff --git a/tests/Control/PanZoomBar.html b/tests/Control/test_PanZoomBar.html similarity index 100% rename from tests/Control/PanZoomBar.html rename to tests/Control/test_PanZoomBar.html diff --git a/tests/Control/Panel.html b/tests/Control/test_Panel.html similarity index 100% rename from tests/Control/Panel.html rename to tests/Control/test_Panel.html diff --git a/tests/Control/Permalink.html b/tests/Control/test_Permalink.html similarity index 100% rename from tests/Control/Permalink.html rename to tests/Control/test_Permalink.html diff --git a/tests/Control/Scale.html b/tests/Control/test_Scale.html similarity index 100% rename from tests/Control/Scale.html rename to tests/Control/test_Scale.html diff --git a/tests/Control/ScaleLine.html b/tests/Control/test_ScaleLine.html similarity index 100% rename from tests/Control/ScaleLine.html rename to tests/Control/test_ScaleLine.html diff --git a/tests/Control/SelectFeature.html b/tests/Control/test_SelectFeature.html similarity index 100% rename from tests/Control/SelectFeature.html rename to tests/Control/test_SelectFeature.html diff --git a/tests/Feature/Vector.html b/tests/Feature/test_Vector.html similarity index 100% rename from tests/Feature/Vector.html rename to tests/Feature/test_Vector.html diff --git a/tests/Format/GML.html b/tests/Format/test_GML.html similarity index 100% rename from tests/Format/GML.html rename to tests/Format/test_GML.html diff --git a/tests/Format/GeoJSON.html b/tests/Format/test_GeoJSON.html similarity index 100% rename from tests/Format/GeoJSON.html rename to tests/Format/test_GeoJSON.html diff --git a/tests/Format/GeoRSS.html b/tests/Format/test_GeoRSS.html similarity index 100% rename from tests/Format/GeoRSS.html rename to tests/Format/test_GeoRSS.html diff --git a/tests/Format/JSON.html b/tests/Format/test_JSON.html similarity index 100% rename from tests/Format/JSON.html rename to tests/Format/test_JSON.html diff --git a/tests/Format/KML.html b/tests/Format/test_KML.html similarity index 100% rename from tests/Format/KML.html rename to tests/Format/test_KML.html diff --git a/tests/Format/OSM.html b/tests/Format/test_OSM.html similarity index 100% rename from tests/Format/OSM.html rename to tests/Format/test_OSM.html diff --git a/tests/Format/SLD.html b/tests/Format/test_SLD.html similarity index 100% rename from tests/Format/SLD.html rename to tests/Format/test_SLD.html diff --git a/tests/Format/WKT.html b/tests/Format/test_WKT.html similarity index 100% rename from tests/Format/WKT.html rename to tests/Format/test_WKT.html diff --git a/tests/Format/WMC.html b/tests/Format/test_WMC.html similarity index 100% rename from tests/Format/WMC.html rename to tests/Format/test_WMC.html diff --git a/tests/Format/XML.html b/tests/Format/test_XML.html similarity index 100% rename from tests/Format/XML.html rename to tests/Format/test_XML.html diff --git a/tests/Geometry/Collection.html b/tests/Geometry/test_Collection.html similarity index 100% rename from tests/Geometry/Collection.html rename to tests/Geometry/test_Collection.html diff --git a/tests/Geometry/Curve.html b/tests/Geometry/test_Curve.html similarity index 100% rename from tests/Geometry/Curve.html rename to tests/Geometry/test_Curve.html diff --git a/tests/Geometry/LineString.html b/tests/Geometry/test_LineString.html similarity index 100% rename from tests/Geometry/LineString.html rename to tests/Geometry/test_LineString.html diff --git a/tests/Geometry/LinearRing.html b/tests/Geometry/test_LinearRing.html similarity index 100% rename from tests/Geometry/LinearRing.html rename to tests/Geometry/test_LinearRing.html diff --git a/tests/Geometry/MultiLineString.html b/tests/Geometry/test_MultiLineString.html similarity index 100% rename from tests/Geometry/MultiLineString.html rename to tests/Geometry/test_MultiLineString.html diff --git a/tests/Geometry/MultiPoint.html b/tests/Geometry/test_MultiPoint.html similarity index 100% rename from tests/Geometry/MultiPoint.html rename to tests/Geometry/test_MultiPoint.html diff --git a/tests/Geometry/MultiPolygon.html b/tests/Geometry/test_MultiPolygon.html similarity index 100% rename from tests/Geometry/MultiPolygon.html rename to tests/Geometry/test_MultiPolygon.html diff --git a/tests/Geometry/Point.html b/tests/Geometry/test_Point.html similarity index 100% rename from tests/Geometry/Point.html rename to tests/Geometry/test_Point.html diff --git a/tests/Geometry/Polygon.html b/tests/Geometry/test_Polygon.html similarity index 100% rename from tests/Geometry/Polygon.html rename to tests/Geometry/test_Polygon.html diff --git a/tests/Geometry/Rectangle.html b/tests/Geometry/test_Rectangle.html similarity index 100% rename from tests/Geometry/Rectangle.html rename to tests/Geometry/test_Rectangle.html diff --git a/tests/Geometry/Surface.html b/tests/Geometry/test_Surface.html similarity index 100% rename from tests/Geometry/Surface.html rename to tests/Geometry/test_Surface.html diff --git a/tests/Handler/Click.html b/tests/Handler/test_Click.html similarity index 100% rename from tests/Handler/Click.html rename to tests/Handler/test_Click.html diff --git a/tests/Handler/Drag.html b/tests/Handler/test_Drag.html similarity index 100% rename from tests/Handler/Drag.html rename to tests/Handler/test_Drag.html diff --git a/tests/Handler/Feature.html b/tests/Handler/test_Feature.html similarity index 100% rename from tests/Handler/Feature.html rename to tests/Handler/test_Feature.html diff --git a/tests/Handler/Hover.html b/tests/Handler/test_Hover.html similarity index 100% rename from tests/Handler/Hover.html rename to tests/Handler/test_Hover.html diff --git a/tests/Handler/Keyboard.html b/tests/Handler/test_Keyboard.html similarity index 100% rename from tests/Handler/Keyboard.html rename to tests/Handler/test_Keyboard.html diff --git a/tests/Handler/MouseWheel.html b/tests/Handler/test_MouseWheel.html similarity index 100% rename from tests/Handler/MouseWheel.html rename to tests/Handler/test_MouseWheel.html diff --git a/tests/Handler/Path.html b/tests/Handler/test_Path.html similarity index 100% rename from tests/Handler/Path.html rename to tests/Handler/test_Path.html diff --git a/tests/Handler/Point.html b/tests/Handler/test_Point.html similarity index 100% rename from tests/Handler/Point.html rename to tests/Handler/test_Point.html diff --git a/tests/Handler/Polygon.html b/tests/Handler/test_Polygon.html similarity index 100% rename from tests/Handler/Polygon.html rename to tests/Handler/test_Polygon.html diff --git a/tests/Handler/RegularPolygon.html b/tests/Handler/test_RegularPolygon.html similarity index 100% rename from tests/Handler/RegularPolygon.html rename to tests/Handler/test_RegularPolygon.html diff --git a/tests/Layer/EventPane.html b/tests/Layer/test_EventPane.html similarity index 100% rename from tests/Layer/EventPane.html rename to tests/Layer/test_EventPane.html diff --git a/tests/Layer/FixedZoomLevels.html b/tests/Layer/test_FixedZoomLevels.html similarity index 100% rename from tests/Layer/FixedZoomLevels.html rename to tests/Layer/test_FixedZoomLevels.html diff --git a/tests/Layer/GML.html b/tests/Layer/test_GML.html similarity index 100% rename from tests/Layer/GML.html rename to tests/Layer/test_GML.html diff --git a/tests/Layer/GeoRSS.html b/tests/Layer/test_GeoRSS.html similarity index 100% rename from tests/Layer/GeoRSS.html rename to tests/Layer/test_GeoRSS.html diff --git a/tests/Layer/Google.html b/tests/Layer/test_Google.html similarity index 100% rename from tests/Layer/Google.html rename to tests/Layer/test_Google.html diff --git a/tests/Layer/Grid.html b/tests/Layer/test_Grid.html similarity index 100% rename from tests/Layer/Grid.html rename to tests/Layer/test_Grid.html diff --git a/tests/Layer/HTTPRequest.html b/tests/Layer/test_HTTPRequest.html similarity index 100% rename from tests/Layer/HTTPRequest.html rename to tests/Layer/test_HTTPRequest.html diff --git a/tests/Layer/Image.html b/tests/Layer/test_Image.html similarity index 100% rename from tests/Layer/Image.html rename to tests/Layer/test_Image.html diff --git a/tests/Layer/KaMap.html b/tests/Layer/test_KaMap.html similarity index 100% rename from tests/Layer/KaMap.html rename to tests/Layer/test_KaMap.html diff --git a/tests/Layer/MapGuide.html b/tests/Layer/test_MapGuide.html similarity index 100% rename from tests/Layer/MapGuide.html rename to tests/Layer/test_MapGuide.html diff --git a/tests/Layer/MapServer.html b/tests/Layer/test_MapServer.html similarity index 100% rename from tests/Layer/MapServer.html rename to tests/Layer/test_MapServer.html diff --git a/tests/Layer/Markers.html b/tests/Layer/test_Markers.html similarity index 100% rename from tests/Layer/Markers.html rename to tests/Layer/test_Markers.html diff --git a/tests/Layer/MultiMap.html b/tests/Layer/test_MultiMap.html similarity index 100% rename from tests/Layer/MultiMap.html rename to tests/Layer/test_MultiMap.html diff --git a/tests/Layer/PointTrack.html b/tests/Layer/test_PointTrack.html similarity index 100% rename from tests/Layer/PointTrack.html rename to tests/Layer/test_PointTrack.html diff --git a/tests/Layer/SphericalMercator.html b/tests/Layer/test_SphericalMercator.html similarity index 100% rename from tests/Layer/SphericalMercator.html rename to tests/Layer/test_SphericalMercator.html diff --git a/tests/Layer/TMS.html b/tests/Layer/test_TMS.html similarity index 100% rename from tests/Layer/TMS.html rename to tests/Layer/test_TMS.html diff --git a/tests/Layer/Text.html b/tests/Layer/test_Text.html similarity index 100% rename from tests/Layer/Text.html rename to tests/Layer/test_Text.html diff --git a/tests/Layer/TileCache.html b/tests/Layer/test_TileCache.html similarity index 100% rename from tests/Layer/TileCache.html rename to tests/Layer/test_TileCache.html diff --git a/tests/Layer/Vector.html b/tests/Layer/test_Vector.html similarity index 100% rename from tests/Layer/Vector.html rename to tests/Layer/test_Vector.html diff --git a/tests/Layer/WFS.html b/tests/Layer/test_WFS.html similarity index 100% rename from tests/Layer/WFS.html rename to tests/Layer/test_WFS.html diff --git a/tests/Layer/WMS.html b/tests/Layer/test_WMS.html similarity index 100% rename from tests/Layer/WMS.html rename to tests/Layer/test_WMS.html diff --git a/tests/Layer/WrapDateLine.html b/tests/Layer/test_WrapDateLine.html similarity index 100% rename from tests/Layer/WrapDateLine.html rename to tests/Layer/test_WrapDateLine.html diff --git a/tests/Layer/Yahoo.html b/tests/Layer/test_Yahoo.html similarity index 100% rename from tests/Layer/Yahoo.html rename to tests/Layer/test_Yahoo.html diff --git a/tests/Marker/Box.html b/tests/Marker/test_Box.html similarity index 100% rename from tests/Marker/Box.html rename to tests/Marker/test_Box.html diff --git a/tests/Popup/Anchored.html b/tests/Popup/test_Anchored.html similarity index 100% rename from tests/Popup/Anchored.html rename to tests/Popup/test_Anchored.html diff --git a/tests/Popup/AnchoredBubble.html b/tests/Popup/test_AnchoredBubble.html similarity index 100% rename from tests/Popup/AnchoredBubble.html rename to tests/Popup/test_AnchoredBubble.html diff --git a/tests/Renderer/Elements.html b/tests/Renderer/test_Elements.html similarity index 100% rename from tests/Renderer/Elements.html rename to tests/Renderer/test_Elements.html diff --git a/tests/Renderer/SVG.html b/tests/Renderer/test_SVG.html similarity index 100% rename from tests/Renderer/SVG.html rename to tests/Renderer/test_SVG.html diff --git a/tests/Renderer/VML.html b/tests/Renderer/test_VML.html similarity index 100% rename from tests/Renderer/VML.html rename to tests/Renderer/test_VML.html diff --git a/tests/Rule/Comparison.html b/tests/Rule/test_Comparison.html similarity index 100% rename from tests/Rule/Comparison.html rename to tests/Rule/test_Comparison.html diff --git a/tests/Rule/FeatureId.html b/tests/Rule/test_FeatureId.html similarity index 100% rename from tests/Rule/FeatureId.html rename to tests/Rule/test_FeatureId.html diff --git a/tests/Rule/Logical.html b/tests/Rule/test_Logical.html similarity index 100% rename from tests/Rule/Logical.html rename to tests/Rule/test_Logical.html diff --git a/tests/Tile/Image.html b/tests/Tile/test_Image.html similarity index 100% rename from tests/Tile/Image.html rename to tests/Tile/test_Image.html diff --git a/tests/Tile/WFS.html b/tests/Tile/test_WFS.html similarity index 100% rename from tests/Tile/WFS.html rename to tests/Tile/test_WFS.html diff --git a/tests/Ajax.html b/tests/test_Ajax.html similarity index 100% rename from tests/Ajax.html rename to tests/test_Ajax.html diff --git a/tests/BaseTypes.html b/tests/test_BaseTypes.html similarity index 100% rename from tests/BaseTypes.html rename to tests/test_BaseTypes.html diff --git a/tests/Console.html b/tests/test_Console.html similarity index 100% rename from tests/Console.html rename to tests/test_Console.html diff --git a/tests/Control.html b/tests/test_Control.html similarity index 100% rename from tests/Control.html rename to tests/test_Control.html diff --git a/tests/Events.html b/tests/test_Events.html similarity index 100% rename from tests/Events.html rename to tests/test_Events.html diff --git a/tests/Feature.html b/tests/test_Feature.html similarity index 100% rename from tests/Feature.html rename to tests/test_Feature.html diff --git a/tests/Format.html b/tests/test_Format.html similarity index 100% rename from tests/Format.html rename to tests/test_Format.html diff --git a/tests/Geometry.html b/tests/test_Geometry.html similarity index 100% rename from tests/Geometry.html rename to tests/test_Geometry.html diff --git a/tests/Handler.html b/tests/test_Handler.html similarity index 100% rename from tests/Handler.html rename to tests/test_Handler.html diff --git a/tests/Icon.html b/tests/test_Icon.html similarity index 100% rename from tests/Icon.html rename to tests/test_Icon.html diff --git a/tests/Lang.html b/tests/test_Lang.html similarity index 100% rename from tests/Lang.html rename to tests/test_Lang.html diff --git a/tests/Layer.html b/tests/test_Layer.html similarity index 100% rename from tests/Layer.html rename to tests/test_Layer.html diff --git a/tests/Map.html b/tests/test_Map.html similarity index 100% rename from tests/Map.html rename to tests/test_Map.html diff --git a/tests/Marker.html b/tests/test_Marker.html similarity index 100% rename from tests/Marker.html rename to tests/test_Marker.html diff --git a/tests/OpenLayers.html b/tests/test_OpenLayers.html similarity index 100% rename from tests/OpenLayers.html rename to tests/test_OpenLayers.html diff --git a/tests/Popup.html b/tests/test_Popup.html similarity index 100% rename from tests/Popup.html rename to tests/test_Popup.html diff --git a/tests/Projection.html b/tests/test_Projection.html similarity index 100% rename from tests/Projection.html rename to tests/test_Projection.html diff --git a/tests/Renderer.html b/tests/test_Renderer.html similarity index 100% rename from tests/Renderer.html rename to tests/test_Renderer.html diff --git a/tests/Rule.html b/tests/test_Rule.html similarity index 100% rename from tests/Rule.html rename to tests/test_Rule.html diff --git a/tests/Style.html b/tests/test_Style.html similarity index 100% rename from tests/Style.html rename to tests/test_Style.html diff --git a/tests/StyleMap.html b/tests/test_StyleMap.html similarity index 100% rename from tests/StyleMap.html rename to tests/test_StyleMap.html diff --git a/tests/Tile.html b/tests/test_Tile.html similarity index 100% rename from tests/Tile.html rename to tests/test_Tile.html diff --git a/tests/Tween.html b/tests/test_Tween.html similarity index 100% rename from tests/Tween.html rename to tests/test_Tween.html diff --git a/tests/Util.html b/tests/test_Util.html similarity index 100% rename from tests/Util.html rename to tests/test_Util.html diff --git a/theme/default/style.css b/theme/default/style.css index c986c59aef..aba1b1b1ec 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -229,4 +229,9 @@ div.olControlMousePosition { opacity: 0.50; font-size: 1px; filter: alpha(opacity=50); -} +} + +.olControlNoSelect { + -moz-user-select: none; +} +