 	updateSidebarHard()
 	$("#head_title").html(diagram.source)
 	CANVAS.css "background", "url(" + toImg(diagram.filename) + ") no-repeat"
+	CANVAS.css "background-position", X_OFFSET + "px " + Y_OFFSET + "px"
 	if not diagram.game.isAlive() # game ended
 		loadAnswersIntoUI(diagram)
 


onDiagramClick = (e) ->
	diagram = game.currDiagram()
	o = new Point("", e.pageX-this.offsetLeft, e.pageY-this.offsetTop)
		# where user clicked
	# Grab the closest point to the click
	diagram.flat_points.sort( (p,q) -> dist(o,p)-dist(o,q) )
	p = diagram.flat_points[0]

# Low-level things
drawCircle = (p, color = "blue", r) ->
	CONTEXT.beginPath()
	CONTEXT.arc p.x+X_OFFSET, p.y+Y_OFFSET, r, 0, 2 * Math.PI
	CONTEXT.strokeStyle = color
	CONTEXT.stroke()
fillCircle = (p, color = "blue", r) ->
	CONTEXT.beginPath()
	CONTEXT.arc p.x+X_OFFSET, p.y+Y_OFFSET, r, 0, 2 * Math.PI
	CONTEXT.fillStyle = color
	CONTEXT.fill()
clearAll = () ->
	CONTEXT.clearRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT)


# jQuery abstractions
enableButtonIf = (selector, bool) ->
