Merge branch 'master' into matbgn-endlessBoard
This commit is contained in:
commit
866ce4b31e
9903
package-lock.json
generated
9903
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -38,7 +38,7 @@
|
|||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"jquery-ui-rotatable": "^1.1.0",
|
"jquery-ui-rotatable": "^1.1.0",
|
||||||
"js-yaml": "3.13.1",
|
"js-yaml": "3.13.1",
|
||||||
"jsdom": "^14.0.0",
|
"jsdom": "^16.5.0",
|
||||||
"jsprim": "^1.4.2",
|
"jsprim": "^1.4.2",
|
||||||
"socket.io": "^4.4.1",
|
"socket.io": "^4.4.1",
|
||||||
"signature_pad": "^4.0.1",
|
"signature_pad": "^4.0.1",
|
||||||
@ -65,7 +65,7 @@
|
|||||||
"husky": "^4.2.5",
|
"husky": "^4.2.5",
|
||||||
"jest": "^27.4.7",
|
"jest": "^27.4.7",
|
||||||
"jquery": "^3.6.0",
|
"jquery": "^3.6.0",
|
||||||
"jquery-ui": "^1.13.1",
|
"jquery-ui": "^1.13.2",
|
||||||
"keymage": "^1.1.3",
|
"keymage": "^1.1.3",
|
||||||
"pdfjs-dist": "^2.12.313",
|
"pdfjs-dist": "^2.12.313",
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
|
@ -333,7 +333,18 @@ function initWhiteboard() {
|
|||||||
.off("click")
|
.off("click")
|
||||||
.click(function () {
|
.click(function () {
|
||||||
if (ReadOnlyService.readOnlyActive) return;
|
if (ReadOnlyService.readOnlyActive) return;
|
||||||
showBasicAlert("Please drag the image into the browser.");
|
showBasicAlert(`Please drag the image into the browser.<br>
|
||||||
|
Or upload here: <input type="file" id="manualFileUpload" name="myfile" />`);
|
||||||
|
document.getElementById("manualFileUpload").addEventListener(
|
||||||
|
"change",
|
||||||
|
function (e) {
|
||||||
|
$(".basicalert").remove();
|
||||||
|
if (ReadOnlyService.readOnlyActive) return;
|
||||||
|
e.originalEvent = { dataTransfer: { files: e.target.files } };
|
||||||
|
handleFileUploadEvent(e);
|
||||||
|
},
|
||||||
|
false
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// save image as imgae
|
// save image as imgae
|
||||||
@ -621,10 +632,8 @@ function initWhiteboard() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#whiteboardContainer").on("drop", function (e) {
|
function handleFileUploadEvent(e) {
|
||||||
//Handle drop
|
console.log(e);
|
||||||
if (ReadOnlyService.readOnlyActive) return;
|
|
||||||
|
|
||||||
if (e.originalEvent.dataTransfer) {
|
if (e.originalEvent.dataTransfer) {
|
||||||
if (e.originalEvent.dataTransfer.files.length) {
|
if (e.originalEvent.dataTransfer.files.length) {
|
||||||
//File from harddisc
|
//File from harddisc
|
||||||
@ -766,6 +775,13 @@ function initWhiteboard() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#whiteboardContainer").on("drop", function (e) {
|
||||||
|
//Handle drop
|
||||||
|
if (ReadOnlyService.readOnlyActive) return;
|
||||||
|
|
||||||
|
handleFileUploadEvent(e);
|
||||||
dragCounter = 0;
|
dragCounter = 0;
|
||||||
whiteboard.dropIndicator.hide();
|
whiteboard.dropIndicator.hide();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user