From 8e6601165fe2c2e657cd872b061aa049a0a9fff2 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Mon, 31 Jan 2022 15:14:15 -0500 Subject: Add seed planting depth data. --- js/garden.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/garden.js b/js/garden.js index daf014b..1551ff5 100644 --- a/js/garden.js +++ b/js/garden.js @@ -43,9 +43,11 @@ class Season { } class Crop { - constructor(name, {fallCrop, family, headStart, interval, maturity, multisow, + constructor(name, {depth, fallCrop, family, headStart, interval, maturity, multisow, overwinterPlant, pause, spacing, springPlant, resume, species, transplant, trellis}) { + // Seed planting depth in inches. + this.depth = depth || .25; // Plant again in the fall? this.fallCrop = fallCrop; // Broad category (brassica, cucurbit, nightshade, etc.) @@ -106,6 +108,7 @@ const CROPS = [ transplant: true }), new Crop("Bean (Bush)", { + depth: 1, family: "Legume", interval: 2, maturity: 8, @@ -114,6 +117,7 @@ const CROPS = [ springPlant: 1 }), new Crop("Bean (Pole)", { + depth: 1, family: "Legume", maturity: 9, spacing: 8, @@ -122,6 +126,7 @@ const CROPS = [ trellis: true }), new Crop("Beet", { + depth: .5, family: "Amaranth", interval: 2, maturity: 8, @@ -217,6 +222,7 @@ const CROPS = [ springPlant: -5 }), new Crop("Cucumber (Vine)", { + depth: .5, family: "Cucurbit", maturity: 9, spacing: 2, @@ -240,6 +246,7 @@ const CROPS = [ transplant: true }), new Crop("Endive", { + depth: .125, family: "Aster", headStart: 6, maturity: 4, @@ -255,6 +262,7 @@ const CROPS = [ springPlant: 0 }), new Crop("Garlic", { + depth: 3, fallCrop: true, overwinterPlant: 2, maturity: 28, @@ -271,6 +279,7 @@ const CROPS = [ transplant: true }), new Crop("Lettuce (Leaf/Mini Head)", { + depth: .125, family: "Aster", headStart: 4, interval: 2, @@ -324,6 +333,7 @@ const CROPS = [ transplant: true }), new Crop("Parsnip", { + depth: .5, family: "Umbellifer", maturity: 14, spacing: 4, @@ -348,6 +358,7 @@ const CROPS = [ transplant: true }), new Crop("Potato", { + depth: 3, family: "Nightshade", maturity: 12, spacing: 4, @@ -355,6 +366,7 @@ const CROPS = [ springPlant: -3 }), new Crop("Radish (Round)", { + depth: .5, family: "Brassica", interval: 2, maturity: 4, @@ -366,6 +378,7 @@ const CROPS = [ springPlant: -3 }), new Crop("Radish (Daikon)", { + depth: .5, family: "Brassica", fallCrop: true, maturity: 9, @@ -383,6 +396,7 @@ const CROPS = [ transplant: true }), new Crop("Spinach", { + depth: .5, family: "Amaranth", interval: 2, maturity: 6, @@ -394,6 +408,7 @@ const CROPS = [ springPlant: -5 }), new Crop("Squash (Summer)", { + depth: 1, family: "Cucurbit", maturity: 8, spacing: 1.0 / 9, @@ -401,6 +416,7 @@ const CROPS = [ springPlant: 0 }), new Crop("Squash (Winter)", { + depth: 1, family: "Cucurbit", maturity: 12, spacing: 0.5, @@ -408,6 +424,7 @@ const CROPS = [ springPlant: 1 }), new Crop("Swiss Chard", { + depth: .5, family: "Amaranth", headStart: 4, maturity: 4, @@ -589,6 +606,7 @@ function viewCropDetails(crop) { } else { addDetail("Spacing", `1 per ${Math.floor(1 / crop.spacing)} square feet`); } + addDetail("Seed planting depth", `${crop.depth}"`); addDetail("Needs a trellis", crop.trellis ? "Yes" : "No"); overlay.classList.add("overlay"); overlay.appendChild(modal); -- cgit v1.2.3