Hi all,

The widely described techniques for disabling doubleclick and wheelzoom in
Navigation control works well. But when in my toolbar I have other controls
like ModifyFeature and DeleteFeature the doubleclick and wheelzoom is never
disaeld. 

Any ideas how to disable doubleclick and wheelzoom in ModifyFeature and
DeleteFeature tools?

The code is:

// Make cutom conrol Tollbar
                                var panelControls = [
                                new OpenLayers.Control.DeleteFeature(vectors, 
{'box': true, title:
"Delete Mark",displayClass: "olControlDeleteFeature"}),
                new OpenLayers.Control.ModifyFeature(vectors, {title:
"Modify Mark", displayClass: "olControlModifyFeature"}),
                new OpenLayers.Control.DrawFeature(vectors,
OpenLayers.Handler.Polygon,{title: "Put Polygon Mark",displayClass:
'olControlDrawFeaturePolygon', handlerOptions: {multi: true}}),                 
        
                                new OpenLayers.Control.DrawFeature(vectors, 
OpenLayers.Handler.Path,
{title: "Put Line Mark",displayClass: 'olControlDrawFeaturePath',
handlerOptions: {multi: true}}),
                                new OpenLayers.Control.DrawFeature(vectors, 
OpenLayers.Handler.Point,
{title: "Put Point Mark",displayClass: 'olControlDrawFeaturePoint',
handlerOptions: {multi: true}}),
                                new 
OpenLayers.Control.Navigation({zoomWheelEnabled:
false,defaultDblClick: function(event) { return; } })                           
                                        ];
                                var toolbar = new 
OpenLayers.Control.Panel({displayClass:
'olControlEditingToolbar', defaultControl: panelControls[0]});
                                
                                toolbar.addControls(panelControls);
                                        
                        map.addLayers([layerM2,layerM1,layerPL,vectors]);
                                map.zoomToExtent( mapBounds );  
                
                    map.addControl(new OpenLayers.Control.PanZoomBar());
                    map.addControl(new OpenLayers.Control.MousePosition());
                    map.addControl(new OpenLayers.Control.MouseDefaults());
                    map.addControl(new OpenLayers.Control.KeyboardDefaults());
                                map.addControl(toolbar);

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Disable-double-clikc-zoom-for-ModifyFeature-and-DeleteFeature-tools-tp6771165p6771165.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to