Software: Apache. PHP/5.5.15 uname -a: Windows NT SVR-DMZ 6.1 build 7600 (Windows Server 2008 R2 Enterprise Edition) i586 SYSTEM Safe-mode: OFF (not secure) E:\nuevo\phpMyAdmin2\js\openlayers\src\openlayers\lib\OpenLayers\Control\ drwxrwxrwx |
Viewing file: DragPan.js (2.41 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | /* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for * full list of contributors). Published under the Clear BSD license. * See http://svn.openlayers.org/trunk/openlayers/license.txt for the * full text of the license. */ /** * @requires OpenLayers/Control.js * @requires OpenLayers/Handler/Drag.js */ /** * Class: OpenLayers.Control.DragPan * The DragPan control pans the map with a drag of the mouse. * * Inherits from: * - <OpenLayers.Control> */ OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, { /** * Property: type * {OpenLayers.Control.TYPES} */ type: OpenLayers.Control.TYPE_TOOL, /** * Property: panned * {Boolean} The map moved. */ panned: false, /** * Property: interval * {Integer} The number of milliseconds that should ellapse before * panning the map again. Set this to increase dragging performance. * Defaults to 25 milliseconds. */ interval: 25, /** * APIProperty: documentDrag * {Boolean} If set to true, mouse dragging will continue even if the * mouse cursor leaves the map viewport. Default is false. */ documentDrag: false, /** * Method: draw * Creates a Drag handler, using <panMap> and * <panMapDone> as callbacks. */ draw: function() { this.handler = new OpenLayers.Handler.Drag(this, { "move": this.panMap, "done": this.panMapDone }, { interval: this.interval, documentDrag: this.documentDrag } ); }, /** * Method: panMap * * Parameters: * xy - {<OpenLayers.Pixel>} Pixel of the mouse position */ panMap: function(xy) { this.panned = true; this.map.pan( this.handler.last.x - xy.x, this.handler.last.y - xy.y, {dragging: this.handler.dragging, animate: false} ); }, /** * Method: panMapDone * Finish the panning operation. Only call setCenter (through <panMap>) * if the map has actually been moved. * * Parameters: * xy - {<OpenLayers.Pixel>} Pixel of the mouse position */ panMapDone: function(xy) { if(this.panned) { this.panMap(xy); this.panned = false; } }, CLASS_NAME: "OpenLayers.Control.DragPan" }); |
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0312 ]-- |