Changeset 33187


Ignore:
Timestamp:
2019-06-21T23:45:38+12:00 (5 years ago)
Author:
wy59
Message:

Bugfix to recently introduced bug: when there are bookshelves, suddenly the 33168 revision commit didn't display the map any more. This broke it for ImagesGPS' classifier display but also for our sectioned collection's classifier display. We still have issues with our classifier not showing all the correct maps and their bounds, but at least, the map shows again when a bookshelf has been opened.

Location:
main/trunk/greenstone3/web/interfaces/default/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/classifier_scripts.js

    r33168 r33187  
    155155            }
    156156            updateOpenClassifiers();           
    157             if(typeof mapEnabled !== 'undefined' && mapEnabled){
     157            if(typeof mapEnabled !== 'undefined'){
    158158                getSubClassifier(sectionID);
    159159            }
  • main/trunk/greenstone3/web/interfaces/default/js/map-scripts.js

    r33186 r33187  
    1 var mapEnabled = true; // variable to detect when map-scripts have been included into document_scripts.js and classifier_scripts.js
     1var mapEnabled = false; // variable to detect when map-scripts have been included into document_scripts.js and classifier_scripts.js
     2                        // Will be set to true iff we have gps map data that the map can display
    23
    34//var newLat, newLng = 0;
     
    3334        if(jsonNodes && jsonNodes.length > 0)
    3435        {
     36            mapEnabled = true;
    3537            for(var i = 0; i < jsonNodes.length; i++)
    3638            {
     
    5254            mapEnabled = false;
    5355            $("#map_canvas").css({display:"none"});
    54             return;
     56            //return;
    5557        }   
    5658    }   
     
    115117function performSearchForMarkers()
    116118{
     119    if(typeof mapEnabled === 'undefined') return;
     120    if(!mapEnabled){ return; }
     121   
    117122    //console.log("@@@ performSearchForMarkers()");
    118123   
     
    785790        if(jsonNodes && jsonNodes.length > 0)
    786791        {
     792            mapEnabled = true;
     793           
    787794            for(var i = 0; i < jsonNodes.length; i++)
    788795            {
     
    797804            }
    798805           
    799             $("#map_canvas").css({"visibility": "visible", "height": ""});
     806            $("#map_canvas").css({display:"block"});
    800807        }
    801808       
Note: See TracChangeset for help on using the changeset viewer.