add events to item label in navigation view: singleclick pans to item, doubleclick zooms to item

This commit is contained in:
rolux 2011-10-03 14:13:48 +00:00
parent d808882aae
commit f75d2512c3

View file

@ -29,7 +29,15 @@ pandora.ui.navigationView = function(type, videoRatio) {
title: '',
width: 96 + Ox.UI.SCROLLBAR_SIZE
})
.css({float: 'left', margin: '4px 0 4px 0'}),
.css({float: 'left', margin: '4px 0 4px 0'})
.bindEvent({
singleclick: function() {
$element[type == 'map' ? 'panToPlace' : 'panToEvent']();
},
doubleclick: function() {
$element[type == 'map' ? 'zoomToPlace' : 'zoomToEvent']();
}
}),
$itemButton = Ox.Button({
title: 'close',