Update index.html
Browse files- index.html +14 -7
index.html
CHANGED
|
@@ -91,6 +91,7 @@
|
|
| 91 |
|
| 92 |
#result>canvas {
|
| 93 |
transform-origin: top;
|
|
|
|
| 94 |
}
|
| 95 |
|
| 96 |
.relative {
|
|
@@ -177,19 +178,19 @@
|
|
| 177 |
</div>
|
| 178 |
</div>
|
| 179 |
<div class="col-lg-4" id="controller">
|
| 180 |
-
<h6
|
| 181 |
<div class="input-group">
|
| 182 |
<label for="upload">
|
| 183 |
<button id="uploadButton" type="button" class="btn btn-primary">Set Image</button>
|
| 184 |
</label>
|
| 185 |
<input id="upload" type="file" class="d-none">
|
| 186 |
-
<label for="faceUpload">
|
| 187 |
-
<button id="faceUploadButton" type="button" class="btn btn-primary">Face Icon</button>
|
| 188 |
-
</label>
|
| 189 |
<input id="faceUpload" type="file" class="d-none">
|
| 190 |
</div>
|
| 191 |
<div class="input-group">
|
| 192 |
<label for="faceUpload">
|
|
|
|
|
|
|
|
|
|
| 193 |
<button id="faceRemoveButton" type="button" class="btn btn-danger">Remove Icon</button>
|
| 194 |
</label>
|
| 195 |
</div>
|
|
@@ -229,6 +230,12 @@
|
|
| 229 |
<div class="input-group">
|
| 230 |
<button id="textShadowToggle" type="button" class="btn btn-primary">TEXT-STROKE</button>
|
| 231 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
</div>
|
| 233 |
</div>
|
| 234 |
</div>
|
|
@@ -282,7 +289,7 @@
|
|
| 282 |
createEditor();
|
| 283 |
setTimeout(function () {
|
| 284 |
html2canvas(document.getElementById("edit"), {
|
| 285 |
-
scale:
|
| 286 |
windowWidth: image.naturalWidth * 2,
|
| 287 |
windowHeight: image.naturalHeight * 2,
|
| 288 |
width: image.naturalWidth,
|
|
@@ -304,8 +311,8 @@
|
|
| 304 |
}).then(canvas => {
|
| 305 |
result.textContent = "";
|
| 306 |
result.appendChild(canvas);
|
| 307 |
-
|
| 308 |
-
canvas.style.
|
| 309 |
});
|
| 310 |
}, 1);
|
| 311 |
}
|
|
|
|
| 91 |
|
| 92 |
#result>canvas {
|
| 93 |
transform-origin: top;
|
| 94 |
+
max-height: 100vh;
|
| 95 |
}
|
| 96 |
|
| 97 |
.relative {
|
|
|
|
| 178 |
</div>
|
| 179 |
</div>
|
| 180 |
<div class="col-lg-4" id="controller">
|
| 181 |
+
<h6>Image Settings</h6>
|
| 182 |
<div class="input-group">
|
| 183 |
<label for="upload">
|
| 184 |
<button id="uploadButton" type="button" class="btn btn-primary">Set Image</button>
|
| 185 |
</label>
|
| 186 |
<input id="upload" type="file" class="d-none">
|
|
|
|
|
|
|
|
|
|
| 187 |
<input id="faceUpload" type="file" class="d-none">
|
| 188 |
</div>
|
| 189 |
<div class="input-group">
|
| 190 |
<label for="faceUpload">
|
| 191 |
+
<button id="faceUploadButton" type="button" class="btn btn-primary">Face Icon</button>
|
| 192 |
+
</label>
|
| 193 |
+
<label for="faceRemove">
|
| 194 |
<button id="faceRemoveButton" type="button" class="btn btn-danger">Remove Icon</button>
|
| 195 |
</label>
|
| 196 |
</div>
|
|
|
|
| 230 |
<div class="input-group">
|
| 231 |
<button id="textShadowToggle" type="button" class="btn btn-primary">TEXT-STROKE</button>
|
| 232 |
</div>
|
| 233 |
+
<h6>Advanced</h6>
|
| 234 |
+
<div class="input-group">
|
| 235 |
+
<span class="input-group-text">Render Scale</span>
|
| 236 |
+
<input type="range" class="form-control form-range" id="renderScale" value="2" step="0.5"
|
| 237 |
+
min="1" max="4">
|
| 238 |
+
</div>
|
| 239 |
</div>
|
| 240 |
</div>
|
| 241 |
</div>
|
|
|
|
| 289 |
createEditor();
|
| 290 |
setTimeout(function () {
|
| 291 |
html2canvas(document.getElementById("edit"), {
|
| 292 |
+
scale: document.getElementById("renderScale").value,
|
| 293 |
windowWidth: image.naturalWidth * 2,
|
| 294 |
windowHeight: image.naturalHeight * 2,
|
| 295 |
width: image.naturalWidth,
|
|
|
|
| 311 |
}).then(canvas => {
|
| 312 |
result.textContent = "";
|
| 313 |
result.appendChild(canvas);
|
| 314 |
+
canvas.style.width = null;
|
| 315 |
+
canvas.style.height = null;
|
| 316 |
});
|
| 317 |
}, 1);
|
| 318 |
}
|