Ignore:
Timestamp:
2019-03-01T18:39:10+13:00 (5 years 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.

File:
1 edited

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
Note: See TracChangeset for help on using the changeset viewer.