OpenLayers OpenLayers

Ticket #757: ovmap.2.patch

File ovmap.2.patch, 1.8 kB (added by euzuro, 1 year ago)

i as well am at a loss as to a good way to test this other than via manual acceptance. i would, however, recommend this small style change that I think should work just as well

  • lib/OpenLayers/Control/OverviewMap.js

    old new  
    221221            OpenLayers.Event.observe(this.maximizeDiv,  
    222222                          'click',  
    223223                          this.maximizeControl.bindAsEventListener(this)); 
    224             OpenLayers.Event.observe(this.maximizeDiv, 
    225                           'dblclick', 
    226                           function(e) { 
    227                               OpenLayers.Event.stop(e); 
    228                           }); 
    229224            this.div.appendChild(this.maximizeDiv); 
    230225     
    231226            // minimize button div 
     
    241236            OpenLayers.Event.observe(this.minimizeDiv,  
    242237                          'click',  
    243238                          this.minimizeControl.bindAsEventListener(this)); 
    244             OpenLayers.Event.observe(this.minimizeDiv, 
    245                           'dblclick', 
    246                           function(e) { 
    247                               OpenLayers.Event.stop(e); 
    248                           }); 
    249239            this.div.appendChild(this.minimizeDiv); 
    250240             
     241            var eventsToStop = ['dblclick','mousedown']; 
     242             
     243            for (var i = 0; i < eventsToStop.length; i++) { 
     244 
     245                OpenLayers.Event.observe(this.maximizeDiv,  
     246                                         eventsToStop[i],  
     247                                         OpenLayers.Event.stop); 
     248 
     249                OpenLayers.Event.observe(this.minimizeDiv, 
     250                                         eventsToStop[i],  
     251                                         OpenLayers.Event.stop); 
     252            } 
     253             
    251254            this.minimizeControl(); 
    252255        } else { 
    253256            // show the overview map