mirror of
https://github.com/tsl0922/EPD-nRF5.git
synced 2025-12-06 15:42:48 +08:00
update html
This commit is contained in:
@@ -193,7 +193,6 @@
|
||||
<span class="links">
|
||||
<a href="https://github.com/tsl0922/EPD-nRF5">Github</a>
|
||||
<a href="https://qm.qq.com/q/SckzhfDxuu">交流群</a>
|
||||
<a href="https://m.tb.cn/h.6HyQcD7?tk=RQvUVjGecdm">支持项目</a>
|
||||
<a href="?debug=true" id="debug-toggle">开发模式</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -289,14 +289,12 @@ function intToHex(intIn) {
|
||||
}
|
||||
|
||||
async function update_image() {
|
||||
let image = new Image();;
|
||||
const image_file = document.getElementById('image_file');
|
||||
if (image_file.files.length > 0) {
|
||||
const file = image_file.files[0];
|
||||
image.src = URL.createObjectURL(file);
|
||||
} else {
|
||||
image.src = document.getElementById('demo-img').src;
|
||||
}
|
||||
if (image_file.files.length == 0) return;
|
||||
|
||||
let image = new Image();;
|
||||
const file = image_file.files[0];
|
||||
image.src = URL.createObjectURL(file);
|
||||
|
||||
image.onload = function(event) {
|
||||
URL.revokeObjectURL(this.src);
|
||||
@@ -361,8 +359,10 @@ document.body.onload = () => {
|
||||
canvas = document.getElementById('canvas');
|
||||
ctx = canvas.getContext("2d");
|
||||
|
||||
ctx.fillStyle = 'white';
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
|
||||
updateButtonStatus();
|
||||
update_image();
|
||||
filterDitheringOptions();
|
||||
|
||||
checkDebugMode();
|
||||
|
||||
Reference in New Issue
Block a user