Ashrafb commited on
Commit
4e8da7d
·
verified ·
1 Parent(s): 1c18385

Update static/index.html

Browse files
Files changed (1) hide show
  1. 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 = outputImage.parentNode;
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
- const img = new Image();
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>