Fixed keyboard issue with chrome

This commit is contained in:
Devine Lu Linvega 2016-12-31 10:56:25 -07:00
parent 0be4b6d9bc
commit 35ceb74763
2 changed files with 3 additions and 1 deletions

View File

@ -114,6 +114,8 @@ function Dotgrid(width,height,grid_x,grid_y)
function draw_line()
{
console.log(vector_element);
var s = document.createElementNS('http://www.w3.org/2000/svg', 'line');
s.setAttribute('x1', -from[0]);
s.setAttribute('y1', from[1]);

View File

@ -4,7 +4,7 @@ function Keyboard()
{
console.log(event.keyCode);
switch (event.key || event.keyCode) {
switch (event.keyCode) {
case 65 : dotgrid.draw_arc_a(); break;
case 83 : dotgrid.draw_arc_c(); break;
case 68 : dotgrid.draw_line(); break;