mirror of
https://github.com/storytold/spark.git
synced 2026-10-09 00:09:53 +00:00
Make viewer drop zone to cover the whole page window
This commit is contained in:
@@ -230,18 +230,19 @@
|
||||
});
|
||||
|
||||
// Handle drag and drop files.
|
||||
const dropZoneEl = document.querySelector('.drop-zone');
|
||||
const dropZoneEl = document.querySelector('.container');
|
||||
const dropUIEl = document.querySelector('.drop-zone');
|
||||
const onDragover = function (e) {
|
||||
e.preventDefault();
|
||||
dropZoneEl.classList.add('dragover');
|
||||
dropUIEl.classList.add('dragover');
|
||||
};
|
||||
const onDragLeave = function () {
|
||||
dropZoneEl.classList.remove('dragover');
|
||||
dropUIEl.classList.remove('dragover');
|
||||
};
|
||||
const onDrop = function (e) {
|
||||
e.preventDefault();
|
||||
dropZoneEl.classList.remove('dragover');
|
||||
dropZoneEl.classList.add('drop');
|
||||
dropUIEl.classList.remove('dragover');
|
||||
dropUIEl.classList.add('drop');
|
||||
|
||||
const files = e.dataTransfer.files;
|
||||
if (files.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user