5d93ba144c6b090fd62152164461eade0d9e4866 larrym Mon May 14 11:45:43 2012 -0700 fix "hgTracks is undefined" error that was occurring when using the PDF Output page diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index edc755d..2234634 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -11,31 +11,31 @@ * string chromName // current chromosome * int winStart // genomic start coordinate (0-based, half-open) * int winEnd // genomic end coordinate * int newWinWidth // new width (in bps) if user clicks on the top ruler * boolean revCmplDisp // true if we are in reverse display * int insideX // width of side-bar (in pixels) * int rulerClickHeight // height of ruler (in pixels) - zero if ruler is hidden * boolean inPlaceUpdate // true if in-place-update is turned on * int imgBox* // various drag-scroll values * boolean measureTiming // true if measureTiming is on * Object trackDb // hash of trackDb entries for tracks which are visible on current page */ function initVars() { // There are various entry points, so we call initVars in several places to make sure all is well - if (!genomePos.original) { + if (typeof(hgTracks) != "undefined" && !genomePos.original) { // remember initial position and size so we can restore it if user cancels genomePos.original = genomePos.getOriginalPos(); genomePos.originalSize = $('#size').text(); dragSelect.originalCursor = jQuery('body').css('cursor'); imageV2.imgTbl = $('#imgTbl'); // imageV2.enabled == true unless: advancedJavascript==false, or trackSearch, or config pg imageV2.enabled = (imageV2.imgTbl != undefined && imageV2.imgTbl.length > 0); jQuery.each(jQuery.browser, function(i, val) { if(val) { browser = i; } }); // jQuery load function with stuff to support drag selection in track img