Changeset 3534
- Timestamp:
- 06/29/07 05:54:20 (1 year ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Control.js (modified) (1 diff)
- trunk/openlayers/tests/Control/test_KeyboardDefaults.html (modified) (1 diff)
- trunk/openlayers/tests/Control/test_LayerSwitcher.html (modified) (1 diff)
- trunk/openlayers/tests/Control/test_NavToolbar.html (modified) (1 diff)
- trunk/openlayers/tests/Control/test_OverviewMap.html (modified) (2 diffs)
- trunk/openlayers/tests/Control/test_PanZoom.html (modified) (1 diff)
- trunk/openlayers/tests/Control/test_PanZoomBar.html (modified) (1 diff)
- trunk/openlayers/tests/Control/test_Panel.html (modified) (1 diff)
- trunk/openlayers/tests/Control/test_Permalink.html (modified) (1 diff)
- trunk/openlayers/tests/Control/test_Scale.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Control.js
r3263 r3534 53 53 // className in options. 54 54 this.displayClass = 55 this.CLASS_NAME.replace("OpenLayers.", "ol").replace( ".","");55 this.CLASS_NAME.replace("OpenLayers.", "ol").replace(/\./g, ""); 56 56 57 57 OpenLayers.Util.extend(this, options); trunk/openlayers/tests/Control/test_KeyboardDefaults.html
r3024 r3534 5 5 var map; 6 6 function test_01_Control_KeyboardDefaults_constructor (t) { 7 t.plan( 1);7 t.plan( 2 ); 8 8 9 9 control = new OpenLayers.Control.KeyboardDefaults(); 10 10 t.ok( control instanceof OpenLayers.Control.KeyboardDefaults, 11 11 "new OpenLayers.Control.KeyboardDefaults returns object" ); 12 t.eq( control.displayClass, "olControlKeyboardDefaults", "displayClass is correct" ); 12 13 } 13 14 trunk/openlayers/tests/Control/test_LayerSwitcher.html
r3288 r3534 6 6 7 7 function test_01_Control_LayerSwitcher_constructor (t) { 8 t.plan( 1);8 t.plan( 2 ); 9 9 10 10 control = new OpenLayers.Control.LayerSwitcher(); 11 11 t.ok( control instanceof OpenLayers.Control.LayerSwitcher, "new OpenLayers.Control.LayerSwitcher returns object" ); 12 t.eq( control.displayClass, "olControlLayerSwitcher", "displayClass is correct" ); 12 13 } 13 14 trunk/openlayers/tests/Control/test_NavToolbar.html
r2803 r3534 5 5 var map; 6 6 function test_01_Control_NavToolbar_constructor (t) { 7 t.plan( 3);7 t.plan( 4 ); 8 8 control = new OpenLayers.Control.NavToolbar(); 9 9 t.ok( control instanceof OpenLayers.Control.NavToolbar, "new OpenLayers.Control.NavToolbar returns object" ); 10 t.eq( control.displayClass, "olControlNavToolbar", "displayClass is correct" ); 10 11 t.ok( control.controls[0] instanceof OpenLayers.Control.Navigation, "NavToolbar contains Control.Navigation object" ); 11 12 t.ok( control.controls[1] instanceof OpenLayers.Control.ZoomBox, "NavToolbar contains Control.ZoomBox object" ); trunk/openlayers/tests/Control/test_OverviewMap.html
r2978 r3534 4 4 <script type="text/javascript"><!-- 5 5 var map; 6 function test_01_Control_ PanZoom_constructor (t) {7 t.plan( 1);6 function test_01_Control_OverviewMap_constructor (t) { 7 t.plan( 2 ); 8 8 9 9 control = new OpenLayers.Control.OverviewMap(); 10 10 t.ok( control instanceof OpenLayers.Control.OverviewMap, "new OpenLayers.Control.OverviewMap returns object" ); 11 t.eq( control.displayClass, "olControlOverviewMap", "displayClass is correct" ); 11 12 } 12 function test_02_Control_ PanZoom_addControl (t) {13 function test_02_Control_OverviewMap_addControl (t) { 13 14 t.plan( 6 ); 14 15 map = new OpenLayers.Map('map'); … … 24 25 map.destroy(); 25 26 } 26 function test_03_Control_ PanZoom_control_events (t) {27 function test_03_Control_OverviewMap_control_events (t) { 27 28 t.plan( 10 ); 28 29 var evt = {which: 1}; // control expects left-click trunk/openlayers/tests/Control/test_PanZoom.html
r3033 r3534 5 5 var map; 6 6 function test_01_Control_PanZoom_constructor (t) { 7 t.plan( 3);7 t.plan( 4 ); 8 8 9 9 control = new OpenLayers.Control.PanZoom(); 10 10 t.ok( control instanceof OpenLayers.Control.PanZoom, "new OpenLayers.Control.PanZoom returns object" ); 11 t.eq( control.displayClass, "olControlPanZoom", "displayClass is correct" ); 11 12 control = new OpenLayers.Control.PanZoom({position: new OpenLayers.Pixel(100,100)}); 12 13 t.eq( control.position.x, 100, "PanZoom X Set correctly."); trunk/openlayers/tests/Control/test_PanZoomBar.html
r2965 r3534 5 5 var map; 6 6 function test_01_Control_PanZoomBar_constructor (t) { 7 t.plan( 3);7 t.plan( 4 ); 8 8 9 9 control = new OpenLayers.Control.PanZoomBar({position: new OpenLayers.Pixel(100,100)}); 10 10 t.ok( control instanceof OpenLayers.Control.PanZoomBar, "new OpenLayers.Control.PanZoomBar returns object" ); 11 t.eq( control.displayClass, "olControlPanZoomBar", "displayClass is correct" ); 11 12 t.eq( control.position.x, 100, "PanZoom X Set correctly."); 12 13 t.eq( control.position.y, 100, "PanZoom y Set correctly."); trunk/openlayers/tests/Control/test_Panel.html
r3441 r3534 4 4 <script type="text/javascript"><!-- 5 5 function test_Control_Panel_constructor (t) { 6 t.plan( 1);6 t.plan( 2 ); 7 7 8 8 control = new OpenLayers.Control.Panel(); 9 9 t.ok( control instanceof OpenLayers.Control.Panel, "new OpenLayers.Control returns object" ); 10 t.eq( control.displayClass, "olControlPanel", "displayClass is correct" ); 10 11 } 11 12 function test_01_Control_Panel_constructor (t) { trunk/openlayers/tests/Control/test_Permalink.html
r2803 r3534 5 5 var map; 6 6 function test_01_Control_Permalink_constructor (t) { 7 t.plan( 1);7 t.plan( 2 ); 8 8 9 9 control = new OpenLayers.Control.Permalink(); 10 10 t.ok( control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object" ); 11 t.eq( control.displayClass, "olControlPermalink", "displayClass is correct" ); 11 12 } 12 13 function test_02_Control_Permalink_updateLinks (t) { trunk/openlayers/tests/Control/test_Scale.html
r2978 r3534 5 5 var map; 6 6 function test_01_Control_Scale_constructor (t) { 7 t.plan( 1);7 t.plan( 2 ); 8 8 9 9 control = new OpenLayers.Control.Scale(); 10 10 t.ok( control instanceof OpenLayers.Control.Scale, "new OpenLayers.Control returns object" ); 11 t.eq( control.displayClass, "olControlScale", "displayClass is correct" ); 11 12 } 12 13 function test_02_Control_Scale_updateScale (t) {
