Changeset 3544
- Timestamp:
- 06/29/07 11:41:29 (1 year ago)
- Files:
-
- sandbox/tschaub/naturaldocs/lib/OpenLayers.js (modified) (6 diffs)
- sandbox/tschaub/naturaldocs/lib/OpenLayers/Control.js (modified) (1 diff)
- sandbox/tschaub/naturaldocs/tests/Control/test_DragPan.html (copied) (copied from trunk/openlayers/tests/Control/test_DragPan.html)
- sandbox/tschaub/naturaldocs/tests/Control/test_KeyboardDefaults.html (modified) (1 diff)
- sandbox/tschaub/naturaldocs/tests/Control/test_LayerSwitcher.html (modified) (1 diff)
- sandbox/tschaub/naturaldocs/tests/Control/test_NavToolbar.html (modified) (1 diff)
- sandbox/tschaub/naturaldocs/tests/Control/test_OverviewMap.html (modified) (2 diffs)
- sandbox/tschaub/naturaldocs/tests/Control/test_PanZoom.html (modified) (1 diff)
- sandbox/tschaub/naturaldocs/tests/Control/test_PanZoomBar.html (modified) (1 diff)
- sandbox/tschaub/naturaldocs/tests/Control/test_Panel.html (modified) (1 diff)
- sandbox/tschaub/naturaldocs/tests/Control/test_Permalink.html (modified) (1 diff)
- sandbox/tschaub/naturaldocs/tests/Control/test_Scale.html (modified) (1 diff)
- sandbox/tschaub/naturaldocs/tests/list-tests.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/tschaub/naturaldocs/lib/OpenLayers.js
r3533 r3544 3 3 * for the full text of the license. */ 4 4 5 /* *5 /* 6 6 * @requires OpenLayers/BaseTypes.js 7 */ 7 */ 8 8 9 (function() { 9 10 /** … … 14 15 */ 15 16 var singleFile = (typeof OpenLayers == "object" && OpenLayers.singleFile); 17 16 18 /** 17 19 * Namespace: OpenLayers … … 50 52 } 51 53 return scriptLocation; 52 }54 } 53 55 }; 54 55 56 /** 56 57 * OpenLayers.singleFile is a flag indicating this file is being included … … 62 63 * When we *are* part of a SFL build we do not dynamically include the 63 64 * OpenLayers library code as it will be appended at the end of this file. 64 */65 */ 65 66 if(!singleFile) { 66 67 var jsfiles = new Array( … … 103 104 "OpenLayers/Layer/GeoRSS.js", 104 105 "OpenLayers/Layer/Boxes.js", 105 "OpenLayers/Layer/Canvas.js",106 106 "OpenLayers/Layer/TMS.js", 107 107 "OpenLayers/Popup/Anchored.js", … … 164 164 ); // etc. 165 165 166 167 166 168 var allScriptTags = ""; 167 169 var host = OpenLayers._getScriptLocation() + "lib/"; sandbox/tschaub/naturaldocs/lib/OpenLayers/Control.js
r3522 r3544 73 73 // className in options. 74 74 this.displayClass = 75 this.CLASS_NAME.replace("OpenLayers.", "ol").replace( ".","");75 this.CLASS_NAME.replace("OpenLayers.", "ol").replace(/\./g, ""); 76 76 77 77 OpenLayers.Util.extend(this, options); sandbox/tschaub/naturaldocs/tests/Control/test_KeyboardDefaults.html
r3024 r3544 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 sandbox/tschaub/naturaldocs/tests/Control/test_LayerSwitcher.html
r3288 r3544 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 sandbox/tschaub/naturaldocs/tests/Control/test_NavToolbar.html
r2803 r3544 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" ); sandbox/tschaub/naturaldocs/tests/Control/test_OverviewMap.html
r2978 r3544 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 sandbox/tschaub/naturaldocs/tests/Control/test_PanZoom.html
r3033 r3544 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."); sandbox/tschaub/naturaldocs/tests/Control/test_PanZoomBar.html
r2965 r3544 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."); sandbox/tschaub/naturaldocs/tests/Control/test_Panel.html
r3481 r3544 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) { sandbox/tschaub/naturaldocs/tests/Control/test_Permalink.html
r2803 r3544 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) { sandbox/tschaub/naturaldocs/tests/Control/test_Scale.html
r2978 r3544 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) { sandbox/tschaub/naturaldocs/tests/list-tests.html
r3481 r3544 54 54 <li>Tile/test_Image.html</li> 55 55 <li>test_Control.html</li> 56 <li>Control/test_DragPan.html</li> 56 57 <li>Control/test_OverviewMap.html</li> 57 58 <li>Control/test_NavToolbar.html</li>
