disable s to download file

This commit is contained in:
Casper Lamboo 2018-02-21 12:28:17 +01:00
parent 7d34f916ac
commit 63b33c69b9

View File

@ -27,8 +27,6 @@ import { createFile } from './src/utils/exportUtils.js';
import sketchDataToJSON from './src/shape/sketchDataToJSON.js'; import sketchDataToJSON from './src/shape/sketchDataToJSON.js';
import { JSONToBlob } from './src/utils/binaryUtils.js'; import { JSONToBlob } from './src/utils/binaryUtils.js';
import keycode from 'keycode';
window.downloadStl = () => { window.downloadStl = () => {
store.dispatch(async (dispatch, getState) => { store.dispatch(async (dispatch, getState) => {
const state = getState(); const state = getState();
@ -46,11 +44,12 @@ window.downloadSketch = () => {
}); });
}; };
window.addEventListener('keydown', (event) => { // import keycode from 'keycode';
// downloadSketch // window.addEventListener('keydown', (event) => {
const key = keycode(event); // // downloadSketch
if (key === 's') window.downloadSketch(); // const key = keycode(event);
}); // if (key === 's') window.downloadSketch();
// });
// add model to store // add model to store