src/hg/js/hgTracks.js 1.36
1.36 2009/08/24 16:55:02 larrym
move map manipulation code into contextMenu block
Index: src/hg/js/hgTracks.js
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/js/hgTracks.js,v
retrieving revision 1.35
retrieving revision 1.36
diff -b -B -U 4 -r1.35 -r1.36
--- src/hg/js/hgTracks.js 23 Aug 2009 21:35:34 -0000 1.35
+++ src/hg/js/hgTracks.js 24 Aug 2009 16:55:02 -0000 1.36
@@ -196,8 +196,17 @@
loadImgAreaSelect(true);
// Don't load contextMenu if jquery.contextmenu.js hasn't been loaded
if(trackImg && jQuery.fn.contextMenu) {
+ if(imageV2) {
+ $("map[name!=ideoMap]").each( function(t) { parseMap($(this, false));});
+ } else {
+ // XXXX still under debate whether we have to remove the map
+ parseMap($('#map'), true);
+ mapHtml = $('#map').html();
+ $('#map').empty();
+ }
+
originalImgTitle = trackImg.attr("title");
if(imageV2) {
loadContextMenu(trackImgTbl);
$(".trDraggable,.nodrop").each( function(t) { loadContextMenu($(this)); });
@@ -247,15 +256,8 @@
trackImgTbl = $('#imgTbl');
imgHeight = trackImg.height();
}
- if(imageV2) {
- $("map[name!=ideoMap]").each( function(t) { parseMap($(this, false));});
- } else {
- parseMap($('#map'), true);
- mapHtml = $('#map').html();
- $('#map').empty();
- }
clickClipHeight = parseInt(rulerEle.value);
newWinWidth = parseInt(document.getElementById("hgt.newWinWidth").value);
imgAreaSelect = jQuery((trackImgTbl || trackImg).imgAreaSelect({ selectionColor: 'blue', outerColor: '',