- left = $canvas.x - window.screen.width * kSensorSize;
- top = $canvas.y - window.screen.height * kSensorSize;
- right = $canvas.x + window.screen.width * kSensorSize;
- bottom = $canvas.y + window.screen.height * kSensorSize;
+ left = modulo($canvas.x - window.screen.width * kSensorSize, maxSize);
+ top = modulo($canvas.y - window.screen.height * kSensorSize, maxSize);
+ right = left + 2 * window.screen.width * kSensorSize;
+ bottom = top + 2 * window.screen.height * kSensorSize;