Changeset 208


Ignore:
Timestamp:
Oct 27, 2006, 11:09:55 AM (13 years ago)
Author:
Nick Burch
Message:

Have the last added point in a slightly different colour

Location:
trunk/gpx.npemap.org.uk
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gpx.npemap.org.uk/tracer.html

    r207 r208  
    129129var clickIsCalibration = false;
    130130
     131// The last image we added
     132// (So we can swap colours)
     133var lastPointImg = null;
     134
    131135// Calibration functions
    132136function request_calibrate() {
     
    307311        pointPosY[pointNum] = drawY;
    308312
     313        // Swap the colour of the last point, if there is one
     314        if(lastPointImg != null) {
     315                lastPointImg.src = "5x5-cross.png";
     316        }
     317
    309318        // Draw the X
    310319        var cross = new Image();
    311         cross.src = "5x5-cross.png";
     320        cross.src = "5x5-cross-alt.png";
    312321        cross.id = "point_" + pointNum;
    313322        cross.onclick = function(e) { removePoint(pointNum) };
    314323        ia.appendChild(cross);
     324        lastPointImg = cross;
    315325
    316326        cross.style.position = "absolute";
     
    328338        cross.style.display = "none";
    329339        document.getElementById("body").appendChild(cross);
     340
    330341        var cross2 = new Image();
    331         cross2.src = "7x7-red-cross.png";
     342        cross2.src = "5x5-cross-alt.png";
    332343        cross2.style.display = "none";
    333344        document.getElementById("body").appendChild(cross2);
     345
     346        var cross3 = new Image();
     347        cross3.src = "7x7-red-cross.png";
     348        cross3.style.display = "none";
     349        document.getElementById("body").appendChild(cross3);
    334350
    335351        var tile_base = "http://npe-tiles.torchboxapps.com/scaled1/";
Note: See TracChangeset for help on using the changeset viewer.