Ticket #610: panzoom.2.patch
| File panzoom.2.patch, 3.1 kB (added by crschmidt, 2 years ago) |
|---|
-
tests/Control/test_PanZoom.html
old new 4 4 <script type="text/javascript"><!-- 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) { 13 16 t.plan( 8 ); -
tests/Control/test_PanZoomBar.html
old new 4 4 <script type="text/javascript"><!-- 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) { 13 15 t.plan( 8 ); -
lib/OpenLayers/Control/PanZoomBar.js
old new 9 9 * @requires OpenLayers/Control/PanZoom.js 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, { 16 14 … … 34 32 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 41 37 /** -
lib/OpenLayers/Control/PanZoom.js
old new 27 27 * @constructor 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 35 35 /**
