Team:StuyGem NYC

From 2014hs.igem.org

(Difference between revisions)
Line 209: Line 209:
       }
       }
-
function writeMessage(canvas, message) {
 
-
        var context = canvas.getContext('2d');
 
-
        context.clearRect(0, 0, canvas.width, canvas.height);
 
-
        context.font = '18pt Calibri';
 
-
        context.fillStyle = 'black';
 
-
        context.fillText(message, 10, 25);
 
-
      }
 
-
      canvas.addEventListener('mousemove', function(evt) {
+
  canvas.addEventListener('mousemove', function(evt){
-
        var mousePos = getMousePos(canvas, evt);
+
  var mousePos = getMousePos(canvas, evt);
-
        var message = 'Mouse position: ' + mousePos.x + ',' + mousePos.y;
+
                if ((parseInt(mousePos.x) < 250) && (parseInt(mousePos.y) < 250)) {
-
        writeMessage(canvas, message);
+
                imageObj.src = 'https://static.igem.org/mediawiki/2014hs/4/42/TeamOn.png';
-
      }, false);
+
imageObj2.src = 'https://static.igem.org/mediawiki/2014hs/7/79/Parts.png';
 +
imageObj3.src = 'https://static.igem.org/mediawiki/2014hs/1/16/Sponsors.png';
 +
imageObj4.src = 'https://static.igem.org/mediawiki/2014hs/9/92/Project.png';
 +
}
 +
}, false);
 +
 
 +
 

Revision as of 03:38, 18 April 2014


StuyGem NYC





Get in touch!

Visit Our Twitter Page!