From f75d2512c3b6cd8f8da5ea1c90a6366f2d86cfd9 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 3 Oct 2011 14:13:48 +0000 Subject: [PATCH] add events to item label in navigation view: singleclick pans to item, doubleclick zooms to item --- static/js/pandora/ui/navigationView.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/static/js/pandora/ui/navigationView.js b/static/js/pandora/ui/navigationView.js index 09a62b2f..ec7e81c8 100644 --- a/static/js/pandora/ui/navigationView.js +++ b/static/js/pandora/ui/navigationView.js @@ -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',