Browse Source

add config option for outline

master
Fr3deric 6 years ago
parent
commit
96b1efb153
  1. 15
      baumgen.js

15
baumgen.js

@ -259,15 +259,18 @@ function draw() {
var rowspace = 20; var rowspace = 20;
var inspace = 30; var inspace = 30;
var outspace = 10; var outspace = 10;
var outline = true;
var maxh = (height - (rows-1)*rowspace - 2*outspace - 2*inspace) / rows; var maxh = (height - (rows-1)*rowspace - 2*outspace - 2*inspace) / rows;
var outline = new Path.Rectangle({ if(outline) {
point: new Point(outspace, outspace), var outlinepath = new Path.Rectangle({
size: new Size(width - 2*outspace, height - 2*outspace), point: new Point(outspace, outspace),
strokeWidth: 2, size: new Size(width - 2*outspace, height - 2*outspace),
strokeColor: 'black' strokeWidth: 2,
}); strokeColor: 'black'
});
}
for(var row=0; row<rows; row++) { for(var row=0; row<rows; row++) {
var y = outspace + inspace + maxh * (row + 1) + rowspace * row; var y = outspace + inspace + maxh * (row + 1) + rowspace * row;

Loading…
Cancel
Save