add a working full window drag and drop

This commit is contained in:
ReznoRMichael 2021-07-19 19:34:32 +02:00
parent 8fc7e6a5f1
commit f5f8ea4520
4 changed files with 37 additions and 1 deletions

View file

@ -97,6 +97,7 @@ If you like the tool and wish it developed further with more functions and easie
— Changes/Fixes: — Changes/Fixes:
✅ Rewrote and optimized large parts of the code. Should work a bit faster now, especially on mobile devices. ✅ Rewrote and optimized large parts of the code. Should work a bit faster now, especially on mobile devices.
✅ Drag and Drop save file should now work for the whole window (not just for the file input field).
✅ Display all entry descriptions by default. They are all blurred when Spoilers checkbox is unchecked. Hover over them to uncover one-by-one. ✅ Display all entry descriptions by default. They are all blurred when Spoilers checkbox is unchecked. Hover over them to uncover one-by-one.
✅ After analyzing a file, entries that are not yet done are now fully blurred when Spoiler checkbox is unchecked. Hover over the name and/or description to uncover it one-by-one. (thanks to kanna for the idea and inspiration!) ✅ After analyzing a file, entries that are not yet done are now fully blurred when Spoiler checkbox is unchecked. Hover over the name and/or description to uncover it one-by-one. (thanks to kanna for the idea and inspiration!)
✅ All sections now have short text descriptions. ✅ All sections now have short text descriptions.

View file

@ -6108,6 +6108,22 @@ document.getElementById("save-location-input").addEventListener("mouseout", func
document.getElementById("checkbox-hints").addEventListener("click", CheckboxHintsToggle, false); document.getElementById("checkbox-hints").addEventListener("click", CheckboxHintsToggle, false);
document.getElementById("checkbox-spoilers").addEventListener("click", CheckboxSpoilersToggle, false); document.getElementById("checkbox-spoilers").addEventListener("click", CheckboxSpoilersToggle, false);
/* Drag & drop file to the window */
window.addEventListener('dragover', function (event) {
event.stopPropagation();
event.preventDefault(); // Style the drag-and-drop as a "copy file" operation.
event.dataTransfer.dropEffect = 'copy';
});
window.addEventListener('drop', function (event) {
event.stopPropagation();
event.preventDefault();
var dt = event.dataTransfer;
/* Launch save file analyzing */
(0,_LoadSaveFile_js__WEBPACK_IMPORTED_MODULE_1__.LoadSaveFile)(dt, new Date());
});
/* ------------------------- Exports ------------------------------- */ /* ------------------------- Exports ------------------------------- */

File diff suppressed because one or more lines are too long

View file

@ -1082,6 +1082,25 @@ document.getElementById("save-location-input").addEventListener("mouseout", () =
document.getElementById("checkbox-hints").addEventListener("click", CheckboxHintsToggle, false); document.getElementById("checkbox-hints").addEventListener("click", CheckboxHintsToggle, false);
document.getElementById("checkbox-spoilers").addEventListener("click", CheckboxSpoilersToggle, false); document.getElementById("checkbox-spoilers").addEventListener("click", CheckboxSpoilersToggle, false);
/* Drag & drop file to the window */
window.addEventListener('dragover', (event) => {
event.stopPropagation();
event.preventDefault();
// Style the drag-and-drop as a "copy file" operation.
event.dataTransfer.dropEffect = 'copy';
});
window.addEventListener('drop', (event) => {
event.stopPropagation();
event.preventDefault();
const dt = event.dataTransfer;
/* Launch save file analyzing */
LoadSaveFile(dt, new Date());
});
/* ------------------------- Exports ------------------------------- */ /* ------------------------- Exports ------------------------------- */
export { export {