, factor)
			}
			apply_transforms(c);
		});


		for (const c of cpus)
		c.addEventListener("mousedown", function(e) {
			e.preventDefault();
			if (e.which == 3) {
				viewport_reset(c);
				apply_transforms(c);
			} else {
				c.dataset.active = "true";
				c.focus();
				c.dataset.isPanning = "true";
				c.dataset.hasHud = "false";
				const [x,y] = cpu_xy(c, e);
				c.dataset.startX = x;
				c.dataset.startY = y;
				c.style.cursor = "grabbing";
				//console.log(`grab ${c.dataset.startX} ${c.dataset.st