added UI for thickness and linecap settings

This commit is contained in:
eelfroth
2017-01-06 02:06:34 +01:00
parent 21ebcbf88c
commit 4cfc67d416
3 changed files with 31 additions and 2 deletions

View File

@@ -227,4 +227,16 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y,thickness = 3,lineca
y = parseInt(y/this.grid_height) * this.grid_height + (this.grid_height/2);
return [parseInt(x),parseInt(y)];
}
// Settings
this.update_style = function(attribute, value) {
switch(attribute) {
case "strokeWidth":
vector_element.style.strokeWidth = value;
break;
case "strokeLinecap":
vector_element.style.strokeLinecap = value;
}
}
}