Commit fedd5647 authored by Matthias Billert's avatar Matthias Billert
Browse files

activeCanvas and EventListener

parent 9cbb99ad
......@@ -250,7 +250,7 @@ function handleTabChange(index) {
$('delete-option').style.display = 'none';
}
document.body.addEventListener('keyup', function(e) {
activeCanvas.addEventListener('keyup', function(e) {
if(e.keyCode == 8 || e.keyCode == 46) {
activeCanvas.getActiveObjects().forEach((obj) => { activeCanvas.remove(obj) });
activeCanvas.discardActiveObject().renderAll();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment