From 13a25b15b728e014f1a788d88af487c8d9d3ba97 Mon Sep 17 00:00:00 2001 From: mikkame Date: Thu, 14 May 2020 22:12:30 +0900 Subject: [PATCH] fixed #36 --- public/preload.js | 5 +++++ src/App.vue | 13 ++++++++++--- src/background.js | 10 +++++++++- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/public/preload.js b/public/preload.js index 1cf49cc..871cb38 100644 --- a/public/preload.js +++ b/public/preload.js @@ -7,6 +7,11 @@ contextBridge.exposeInMainWorld( ipcRenderer.on('drop-file', (e, data) => { const event = new CustomEvent('drop-file', {detail:data}) + document.dispatchEvent(event) +}) +ipcRenderer.on('toggle-draw', (e) => { + const event = new Event('toggle-draw') document.dispatchEvent(event) }) + diff --git a/src/App.vue b/src/App.vue index 89c326d..fb03b77 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,5 @@