8e92b472cd22b4d942e2baabc912ed9c558c7b8a tdreszer Thu Aug 18 11:09:52 2011 -0700 For shift-dragZoom, switching the cursor to crosshair when shift key is down. diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 279ce42..1757c39 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -1026,32 +1026,38 @@ } // globals across all panImages portalWidth = $(pan).width(); // globals to one panImage var newX = 0; var mouseDownX = 0; var mouseIsDown = false; var beyondImage = false; var atEdge = false; initialize(); function initialize(){ - if ( !($.browser.msie) ) // IE will override map items cursors as well! - $(pan).parents('td.tdData').css('cursor',"url(../images/grabber.cur),w-resize"); + $(pan).parents('td.tdData').mousemove(function(e) { + if (e.shiftKey) + $(this).css('cursor',"crosshair"); // shift-dragZoom + else if ( $.browser.msie ) // IE will override map item cursors if this gets set + $(this).css('cursor',""); // normal pointer when not over clickable item + else + $(this).css('cursor',"url(../images/grabber.cur),w-resize"); // dragScroll + }); panAdjustHeight(prevX); pan.mousedown(function(e){ if (e.which > 1 || e.button > 1 || e.shiftKey) return true; if(mouseIsDown == false) { if(contextMenu) { contextMenu.hide(); } mouseIsDown = true; mouseDownX = e.clientX; atEdge = (!beyondImage && (prevX >= leftLimit || prevX <= rightLimit)); $(document).bind('mousemove',panner); $(document).bind( 'mouseup', panMouseUp); // Will exec only once