Changeset 32833

Show
Ignore:
Timestamp:
01.03.2019 18:39:10 (8 months ago)
Author:
ak19
Message:

Zeddy cleanup. Better debugging info as to where in the code we are. Removed an unused var and some commented out code.

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

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/map-scripts-editor.js

    r32832 r32833  
    44    this.id = id; 
    55    this.shiftKeyPressed = false; 
    6     this.ctrlKeyPressed = false; 
    76    this.beingDragged = false; 
    87    this.allowDeselect = true; 
     
    8887    document.getElementById("thicknessRange" + "-" + this.id).addEventListener("mouseup", function () { that.shapeSpecsChangeMU() }); 
    8988    document.getElementById("colourOpacity" + "-" + this.id).addEventListener("mouseup", function() { that.shapeSpecsChangeMU() } ); 
    90 //  document.onmousemove = function (ev) { 
    91 //      //How can I know the state of mouse from here 
    92 //      if (that.mouseState == 'down') { 
    93 //          //console.log('mouse down state') 
    94 //      } 
    95 //      if (that.mouseState == 'up') { 
    96 //          //console.log('mouse up state') 
    97 //      } 
    98 //  } 
    9989 
    10090    document.onmousedown = function (ev) { 
     
    117107        var message = "Changes are not saved. Are you sure you want to leave?"; 
    118108         
    119         console.log(currentOverlays); 
     109        console.log("@@@ onbeforeunload. currentOverlays: " + currentOverlays); 
    120110        console.log(that.savedOverlays); 
    121111        console.log(enableMessage); 
     
    342332    //Keyboard shortcuts             
    343333    var mapAndControls = document.getElementById("map-and-controls-" + this.id);  
    344     console.log(mapAndControls); 
     334    console.log("@@@@ initMapEditor. mapAndControls: " + mapAndControls); 
    345335     
    346336    //Sets shift as unpressed 
     
    689679} 
    690680 
    691  
     681// TODO: When finished testing, can remove this debug function that just prints to console 
    692682MapEditor.prototype.printHistory = function () { 
    693683    console.log("prev", this.mapEditorHistory.prevOverlays); 
    694684    console.log("present ", this.mapEditorHistory.presentOverlays); 
    695685    console.log("undone ", this.mapEditorHistory.undoneOverlays); 
    696     console.log(this.selectedShapes); 
    697      
    698     //var collection = gs.cgiParams.c; 
    699     //console.log(collection); 
    700     //console.log(this.overlays); 
    701     //var json_overlays = ShapesUtil.overlayToJSON(this.overlays); 
    702      
    703  
     686    console.log("@@@@ selectedShapes: " + this.selectedShapes); 
    704687} 
    705688 
  • main/trunk/greenstone3/web/interfaces/default/js/map-scripts.js

    r32832 r32833  
    363363            gs.functions.setArchivesMetadata(collection, site_name, nodeID, "Latitude", null, lat, null, "override", function(){callbackFunction();}); 
    364364            gs.functions.setArchivesMetadata(collection, site_name, nodeID, "Longitude", null, lng, null, "override", function(){callbackFunction();}); 
    365             console.log(nodeID); 
     365            console.log("NodeID: " + nodeID); 
    366366            console.log("GPS Click handler in collection:" + collection + " in site: " + site_name + " for Doc: " + nodeID + "(" + lat + "," + lng + ")"); 
    367367        });