Browse Source

add config option for outline

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

5
baumgen.js

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

Loading…
Cancel
Save