map.js
/*
 * Draws the Roomba icon and possibly other info
 */
Draws the Roomba icon and possibly other info
Draws the Roomba icon and possibly other info
function drawOverlay() {
	let pos = mapPosToViewportPos(currentPos);
	let size = ROOMBA_DIAMETER * scale;
	domContext.translate(pos.x, pos.y);
	domContext.rotate(currentAngle * Math.PI / 180);
	domContext.drawImage(robotIcon, -(size / 2), -(size / 2), size, size);
	domContext.setTransform(1, 0, 0, 1, 0, 0);  
}
function drawOverlay ( ) { let pos = mapPosToViewportPos ( currentPos ) ; let size = ROOMBA_DIAMETER * scale ; domContext . translate ( pos . x , pos . y ) ; domContext . rotate ( currentAngle * Math . PI / 180 ) ; domContext . drawImage ( robotIcon , - ( size / 2 ) , - ( size / 2 ) , size , size ) ; domContext . setTransform ( 1 , 0 , 0 , 1 , 0 , 0 ) ; }
Draws the Roomba icon and possibly other info
Draws the Roomba icon and possibly other info
// Reset transformation matrix to the identity matrix