Update static/index.html
Browse files- static/index.html +3 -2
static/index.html
CHANGED
|
@@ -125,7 +125,7 @@
|
|
| 125 |
posX = e.clientX - offsetX;
|
| 126 |
posY = e.clientY - offsetY;
|
| 127 |
}
|
| 128 |
-
const imageContainer =
|
| 129 |
posX = Math.max(0, Math.min(posX, imageContainer.clientWidth - outputImage.clientWidth + offsetX));
|
| 130 |
posY = Math.max(0, Math.min(posY, imageContainer.clientHeight - outputImage.clientHeight + offsetY));
|
| 131 |
|
|
@@ -138,7 +138,7 @@
|
|
| 138 |
dragY = null;
|
| 139 |
}
|
| 140 |
|
| 141 |
-
|
| 142 |
img.onload = function() {
|
| 143 |
canvas.width = img.width;
|
| 144 |
canvas.height = img.height;
|
|
@@ -182,6 +182,7 @@
|
|
| 182 |
|
| 183 |
|
| 184 |
|
|
|
|
| 185 |
</script>
|
| 186 |
</body>
|
| 187 |
</html>
|
|
|
|
| 125 |
posX = e.clientX - offsetX;
|
| 126 |
posY = e.clientY - offsetY;
|
| 127 |
}
|
| 128 |
+
const imageContainer = outputImageContainer;
|
| 129 |
posX = Math.max(0, Math.min(posX, imageContainer.clientWidth - outputImage.clientWidth + offsetX));
|
| 130 |
posY = Math.max(0, Math.min(posY, imageContainer.clientHeight - outputImage.clientHeight + offsetY));
|
| 131 |
|
|
|
|
| 138 |
dragY = null;
|
| 139 |
}
|
| 140 |
|
| 141 |
+
const img = new Image();
|
| 142 |
img.onload = function() {
|
| 143 |
canvas.width = img.width;
|
| 144 |
canvas.height = img.height;
|
|
|
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
+
|
| 186 |
</script>
|
| 187 |
</body>
|
| 188 |
</html>
|