Changeset 2965
- Timestamp:
- 04/01/07 21:03:25 (2 years ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Control/PanZoom.js (modified) (1 diff)
- trunk/openlayers/lib/OpenLayers/Control/PanZoomBar.js (modified) (2 diffs)
- trunk/openlayers/tests/Control/test_PanZoom.html (modified) (1 diff)
- trunk/openlayers/tests/Control/test_PanZoomBar.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Control/PanZoom.js
r2932 r2965 28 28 */ 29 29 initialize: function() { 30 OpenLayers.Control.prototype.initialize.apply(this, arguments);31 30 this.position = new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X, 32 31 OpenLayers.Control.PanZoom.Y); 32 OpenLayers.Control.prototype.initialize.apply(this, arguments); 33 33 }, 34 34 trunk/openlayers/lib/OpenLayers/Control/PanZoomBar.js
r2933 r2965 10 10 */ 11 11 OpenLayers.Control.PanZoomBar = OpenLayers.Class.create(); 12 OpenLayers.Control.PanZoomBar.X = 4;13 OpenLayers.Control.PanZoomBar.Y = 4;14 12 OpenLayers.Control.PanZoomBar.prototype = 15 13 OpenLayers.Class.inherit( OpenLayers.Control.PanZoom, { … … 35 33 initialize: function() { 36 34 OpenLayers.Control.PanZoom.prototype.initialize.apply(this, arguments); 37 this.position = new OpenLayers.Pixel(OpenLayers.Control.PanZoomBar.X,38 OpenLayers.Control.PanZoomBar.Y);39 35 }, 40 36 trunk/openlayers/tests/Control/test_PanZoom.html
r2922 r2965 5 5 var map; 6 6 function test_01_Control_PanZoom_constructor (t) { 7 t.plan( 1);7 t.plan( 3 ); 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 control = new OpenLayers.Control.PanZoom({position: new OpenLayers.Pixel(100,100)}); 12 t.eq( control.position.x, 100, "PanZoom X Set correctly."); 13 t.eq( control.position.y, 100, "PanZoom y Set correctly."); 11 14 } 12 15 function test_02_Control_PanZoom_addControl (t) { trunk/openlayers/tests/Control/test_PanZoomBar.html
r2803 r2965 5 5 var map; 6 6 function test_01_Control_PanZoomBar_constructor (t) { 7 t.plan( 1);7 t.plan( 3 ); 8 8 9 control = new OpenLayers.Control.PanZoomBar( );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.position.x, 100, "PanZoom X Set correctly."); 12 t.eq( control.position.y, 100, "PanZoom y Set correctly."); 11 13 } 12 14 function test_02_Control_PanZoomBar_addControl (t) {
