Changeset 3285
- Timestamp:
- 06/07/07 15:19:06 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Control/LayerSwitcher.js
r3068 r3285 100 100 101 101 // set mode to minimize 102 this.minimizeControl(); 103 102 if(!this.outsideViewport) { 103 this.minimizeControl(); 104 } 105 104 106 // populate div with current info 105 107 this.redraw(); trunk/openlayers/tests/Control/test_LayerSwitcher.html
r2803 r3285 22 22 t.ok( control.div != null, "draw makes a div" ); 23 23 t.ok( div != null, "draw returns its div" ); 24 } 25 function test_Control_LayerSwitcher_outsideViewport (t) { 26 t.plan( 2 ); 27 28 map = new OpenLayers.Map('map'); 29 control = new OpenLayers.Control.LayerSwitcher({'div':OpenLayers.Util.getElement('layerswitcher')}); 30 map.addControl(control); 31 console.log(control.outsideViewport); 32 t.eq(control.div.style.width, "250px", "Div is not minimized when added."); 33 control = new OpenLayers.Control.LayerSwitcher(); 34 map.addControl(control); 35 t.eq(control.div.style.width, "0px", "Div is minimized when added."); 24 36 } 25 37 … … 111 123 <body> 112 124 <div id="map" style="width: 1024px; height: 512px;"/> 125 <div id="layerswitcher" style="width:250px; height:256px;" /> 113 126 </body> 114 127 </html>
