OpenLayers OpenLayers

Ticket #651: panzoom.patch

File panzoom.patch, 4.9 kB (added by crschmidt, 1 year ago)
  • lib/OpenLayers/Control/PanZoom.js

    old new  
    117117 
    118118        OpenLayers.Event.observe(btn, "mousedown",  
    119119                                 this.buttonDown.bindAsEventListener(btn)); 
    120         OpenLayers.Event.observe(btn, "mouseup",  
    121                                  this.doubleClick.bindAsEventListener(btn)); 
    122120        OpenLayers.Event.observe(btn, "dblclick",  
    123121                                 this.doubleClick.bindAsEventListener(btn)); 
    124122        OpenLayers.Event.observe(btn, "click",  
  • tests/Control/test_PanZoom.html

    old new  
    6262                    simulateClick(wnd, wnd.control.buttons[0]); 
    6363                    t.ok( wnd.mapper.getCenter().lat > wnd.centerLL.lat, "Pan up works correctly" ); 
    6464                    t.ok(!flag.mousedown, "mousedown does not get to the map"); 
    65                     t.ok(!flag.mouseup, "mouseup does not get to the map"); 
     65                    t.ok(flag.mouseup, "mouseup does get to the map"); 
    6666                    t.ok(!flag.click, "click does not get to the map"); 
    6767                    t.ok(!flag.dblclick, "dblclick does not get to the map"); 
    6868                    resetFlags(); 
     
    7070                    simulateClick(wnd, wnd.control.buttons[1]); 
    7171                    t.ok( wnd.mapper.getCenter().lon < wnd.centerLL.lon, "Pan left works correctly" ); 
    7272                    t.ok(!flag.mousedown, "mousedown does not get to the map"); 
    73                     t.ok(!flag.mouseup, "mouseup does not get to the map"); 
     73                    t.ok(flag.mouseup, "mouseup does get to the map"); 
    7474                    t.ok(!flag.click, "click does not get to the map"); 
    7575                    t.ok(!flag.dblclick, "dblclick does not get to the map"); 
    7676                    resetFlags(); 
     
    7878                    simulateClick(wnd, wnd.control.buttons[2]); 
    7979                    t.ok( wnd.mapper.getCenter().lon == wnd.centerLL.lon, "Pan right works correctly" ); 
    8080                    t.ok(!flag.mousedown, "mousedown does not get to the map"); 
    81                     t.ok(!flag.mouseup, "mouseup does not get to the map"); 
     81                    t.ok(flag.mouseup, "mouseup does get to the map"); 
    8282                    t.ok(!flag.click, "click does not get to the map"); 
    8383                    t.ok(!flag.dblclick, "dblclick does not get to the map"); 
    8484                    resetFlags(); 
     
    8686                    simulateClick(wnd, wnd.control.buttons[3]); 
    8787                    t.ok( wnd.mapper.getCenter().lat == wnd.centerLL.lat, "Pan down works correctly" ); 
    8888                    t.ok(!flag.mousedown, "mousedown does not get to the map"); 
    89                     t.ok(!flag.mouseup, "mouseup does not get to the map"); 
     89                    t.ok(flag.mouseup, "mouseup does get to the map"); 
    9090                    t.ok(!flag.click, "click does not get to the map"); 
    9191                    t.ok(!flag.dblclick, "dblclick does not get to the map"); 
    9292                    resetFlags(); 
     
    9494                    simulateClick(wnd, wnd.control.buttons[4]); 
    9595                    t.eq( wnd.mapper.getZoom(), 6, "zoomin works correctly" ); 
    9696                    t.ok(!flag.mousedown, "mousedown does not get to the map"); 
    97                     t.ok(!flag.mouseup, "mouseup does not get to the map"); 
     97                    t.ok(flag.mouseup, "mouseup does get to the map"); 
    9898                    t.ok(!flag.click, "click does not get to the map"); 
    9999                    t.ok(!flag.dblclick, "dblclick does not get to the map"); 
    100100                    resetFlags(); 
     
    102102                    simulateClick(wnd, wnd.control.buttons[6]); 
    103103                    t.eq( wnd.mapper.getZoom(), 5, "zoomout works correctly" ); 
    104104                    t.ok(!flag.mousedown, "mousedown does not get to the map"); 
    105                     t.ok(!flag.mouseup, "mouseup does not get to the map"); 
     105                    t.ok(flag.mouseup, "mouseup does get to the map"); 
    106106                    t.ok(!flag.click, "click does not get to the map"); 
    107107                    t.ok(!flag.dblclick, "dblclick does not get to the map"); 
    108108                    resetFlags(); 
     
    110110                    simulateClick(wnd, wnd.control.buttons[5]); 
    111111                    t.eq( wnd.mapper.getZoom(), 2, "zoomworld works correctly" ); 
    112112                    t.ok(!flag.mousedown, "mousedown does not get to the map"); 
    113                     t.ok(!flag.mouseup, "mouseup does not get to the map"); 
     113                    t.ok(flag.mouseup, "mouseup does get to the map"); 
    114114                    t.ok(!flag.click, "click does not get to the map"); 
    115115                    t.ok(!flag.dblclick, "dblclick does not get to the map"); 
    116116                    resetFlags();