OpenLayers OpenLayers

Ticket #996: slideFactor.patch

File slideFactor.patch, 1.1 kB (added by euzuro, 1 year ago)

actually *use* slidefactor property

  • lib/OpenLayers/Control/PanZoom.js

    old new  
    1515 
    1616    /**  
    1717     * APIProperty: slideFactor 
    18      * {Float} 
     18     * {Integer} Number of pixels by which we'll pan the map in any direction 
     19     *     on clicking the arrow buttons. 
    1920     */ 
    2021    slideFactor: 50, 
    2122 
     
    151152 
    152153        switch (this.action) { 
    153154            case "panup":  
    154                 this.map.pan(0, -50); 
     155                this.map.pan(0, -this.slideFactor); 
    155156                break; 
    156157            case "pandown":  
    157                 this.map.pan(0, 50); 
     158                this.map.pan(0, this.slideFactor); 
    158159                break; 
    159160            case "panleft":  
    160                 this.map.pan(-50, 0); 
     161                this.map.pan(-this.slideFactor, 0); 
    161162                break; 
    162163            case "panright":  
    163                 this.map.pan(50, 0); 
     164                this.map.pan(this.slideFactor, 0); 
    164165                break; 
    165166            case "zoomin":  
    166167                this.map.zoomIn();