[OpenLayers-Dev] Problem on Safari with the drag feature.

SebastienLachance sebastien.lachance at gmail.com
Fri Jan 30 10:53:52 EST 2009


I'm using OpenLayers (2.7 in the js file it says : $Revision: 8012 $)  to
allow user to position polygon on a surface (map or picture). Everything
works fine, except for Safari. 

When dragging the feature, after some time (1-2 seconds), Safari crashes (on
Mac an PC). I can't seem to find any reason for this. 

            drawControls = {
                select: new OpenLayers.Control.SelectFeature(vectorLayer,
{onSelect: onFeatureSelect, onUnselect: onFeatureUnselect }),
                modify: new OpenLayers.Control.ModifyFeature(vectorLayer, {
deleteCodes: [46, 100], onModificationStart: hideMiddleVertices,
onModificationEnd: hideMiddleVertices, onModification: hideMiddleVertices })
            };

            for (var key in drawControls) {
                map.addControl(drawControls[key]);
            }

            drawControls['select'].activate();
           
            //Set the map in edition mode
            drawControls.modify.mode =
OpenLayers.Control.ModifyFeature.RESHAPE |
OpenLayers.Control.ModifyFeature.DRAG;


onFeatureSelect and onFeatureUnselect, add and remove the popup and
hiddleMiddleVertices hides the draggable points between each corner.
Removing all those events did not change anything.

Someone knows what I'm doing wrong?

Sébastien Lachance
http://www.sebastienlachance.com
-- 
View this message in context: http://n2.nabble.com/Problem-on-Safari-with-the-drag-feature.-tp2245491p2245491.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.




More information about the Dev mailing list