refactor to be tiling window manager friendly

This commit is contained in:
mix irving
2017-11-16 21:42:46 +13:00
parent a4cce3eb85
commit cb41477afa
4 changed files with 35 additions and 27 deletions
+14 -12
View File
@@ -17,19 +17,21 @@
<title>Dotgrid(Icon)</title>
</head>
<body>
<script>
const {dialog,app} = require('electron').remote;
const fs = require('fs');
dotgrid = new Dotgrid(300,300,20,20,4,4, 10,"square","#000000");
dotgrid.install();
<div id="app">
<script>
const {dialog,app} = require('electron').remote;
const fs = require('fs');
dotgrid = new Dotgrid(300,300,20,20,4,4, 10,"square","#000000");
dotgrid.install();
var keyboard = new Keyboard();
var keyboard = new Keyboard();
document.onkeyup = function myFunction(event){ keyboard.listen(event); };
document.addEventListener('mousedown', function(e){ dotgrid.mouse_down(e); }, false);
document.addEventListener('mousemove', function(e){ dotgrid.mouse_move(e); }, false);
document.addEventListener('mouseup', function(e){ dotgrid.mouse_up(e);}, false);
</script>
document.onkeyup = function myFunction(event){ keyboard.listen(event); };
document.addEventListener('mousedown', function(e){ dotgrid.mouse_down(e); }, false);
document.addEventListener('mousemove', function(e){ dotgrid.mouse_move(e); }, false);
document.addEventListener('mouseup', function(e){ dotgrid.mouse_up(e);}, false);
</script>
</div>
</body>
</html>