Drawing handles

This commit is contained in:
Devine Lu Linvega
2018-02-06 14:23:25 +13:00
parent d3b7b113b1
commit 127d36d821
3 changed files with 11 additions and 3 deletions

View File

@@ -72,6 +72,14 @@ function Guide()
this.draw_vertex(dotgrid.tool.verteces[id]);
}
for(segment_id in dotgrid.tool.layer()){
var segment = dotgrid.tool.layer()[segment_id];
for(vertex_id in segment.verteces){
var vertex = segment.verteces[vertex_id];
this.draw_handle(vertex);
}
}
// Translations
if(dotgrid.translation){
this.draw_translation();
@@ -99,7 +107,7 @@ function Guide()
ctx.closePath();
}
this.draw_handle = function(pos,radius)
this.draw_handle = function(pos,radius = 5)
{
var ctx = this.widgets.getContext('2d');
@@ -108,7 +116,6 @@ function Guide()
ctx.fillStyle = dotgrid.theme.active.f_high;
ctx.fill();
ctx.closePath();
ctx.beginPath();
ctx.arc((pos.x * 2)+20, (pos.y * 2)+20, radius, 0, 2 * Math.PI, false);
ctx.fillStyle = dotgrid.theme.active.f_high;