OpenLayers OpenLayers
Show
Ignore:
Timestamp:
07/29/08 14:20:19 (4 months ago)
Author:
tschaub
Message:

Adding a box property to the SelectFeature control for selecting all features within a box. p=pgiraud, r=me,crschmidt (closes #1071)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/examples/select-feature.html

    r7095 r7589  
    4242                        multiple: false, hover: false, 
    4343                        toggleKey: "ctrlKey", // ctrl key removes from selection 
    44                         multipleKey: "shiftKey" // shift key adds to selection 
     44                        multipleKey: "shiftKey", // shift key adds to selection 
     45                        box: true 
    4546                    } 
    4647                ) 
     
    7071            var hover = document.getElementById("hover").checked; 
    7172            drawControls.select.hover = hover; 
    72             if(hover && drawControls.select.active) { 
    73                 // turn on/off to clear feature property of handler 
     73            drawControls.select.box = document.getElementById("box").checked; 
     74            if(drawControls.select.active) { 
    7475                drawControls.select.deactivate(); 
    7576                drawControls.select.activate(); 
     
    112113            <ul> 
    113114                <li> 
     115                    <input id="box" type="checkbox" checked="checked" 
     116                           name="box" onchange="update()" /> 
     117                    <label for="box">select features in a box</label> 
     118                </li> 
     119                <li> 
    114120                    <input id="clickout" type="checkbox" 
    115121                           name="clickout" onchange="update()" />