Compare commits
No commits in common. "9dfc567d5caeec6112bff85fdc97f11146627643" and "c86ed21c1e823da8fc95cf29b47ff40d1f44d670" have entirely different histories.
9dfc567d5c
...
c86ed21c1e
@ -1,17 +1,15 @@
|
|||||||
const MINIMUM_BASE_AREA = 0.5;
|
const MINIMUM_BASE_AREA = 0.5;
|
||||||
const MINIMUM_AREA_THREE_RATS = 1.5;
|
const MINIMUM_AREA_THREE_RATS = 1.8;
|
||||||
const AREA_PER_ADDITIONAL_RAT = 0.25;
|
const AREA_PER_ADDITIONAL_RAT = 0.2;
|
||||||
const MAXIMUM_FALL_HEIGHT = 0.5;
|
const MAXIMUM_FALL_HEIGHT = 0.5;
|
||||||
const MINIMUM_LENGTH_LONG_SIDE = 0.8;
|
const MINIMUM_LENGTH = 0.8;
|
||||||
const MINIMUM_LENGTH_SHORT_SIDE = 0.5;
|
|
||||||
const MINIMUM_FLOOR_HEIGHT = 0.3;
|
const MINIMUM_FLOOR_HEIGHT = 0.3;
|
||||||
|
|
||||||
const FAILED_BASE_AREA = "base_area";
|
const FAILED_BASE_AREA = "base_area";
|
||||||
const FAILED_OVERALL_AREA = "overall_area";
|
const FAILED_OVERALL_AREA = "overall_area";
|
||||||
const FAILED_FALL_HEIGHT = "fall_height";
|
const FAILED_FALL_HEIGHT = "fall_height";
|
||||||
const FAILED_NUM_RATS = "num_rats";
|
const FAILED_NUM_RATS = "num_rats";
|
||||||
const FAILED_MINIMUM_LENGTH_LONG_SIDE = "length_long_side";
|
const FAILED_LENGTH = "length";
|
||||||
const FAILED_MINIMUM_LENGTH_SHORT_SIDE= "length_short_side";
|
|
||||||
const FAILED_FLOOR_HEIGHT = "floor_height"
|
const FAILED_FLOOR_HEIGHT = "floor_height"
|
||||||
|
|
||||||
const FAIL_CRITERIA = {
|
const FAIL_CRITERIA = {
|
||||||
@ -20,8 +18,7 @@ const FAIL_CRITERIA = {
|
|||||||
[FAILED_FALL_HEIGHT]: `Die mögliche Fallhöhe darf nicht mehr als ${(MAXIMUM_FALL_HEIGHT * 100).toFixed(0)}cm betragen.`,
|
[FAILED_FALL_HEIGHT]: `Die mögliche Fallhöhe darf nicht mehr als ${(MAXIMUM_FALL_HEIGHT * 100).toFixed(0)}cm betragen.`,
|
||||||
[FAILED_FLOOR_HEIGHT]: `Der Mindestabstand zwischen Ebenen muss ${(MINIMUM_FLOOR_HEIGHT * 100).toFixed(0)}cm betragen.`,
|
[FAILED_FLOOR_HEIGHT]: `Der Mindestabstand zwischen Ebenen muss ${(MINIMUM_FLOOR_HEIGHT * 100).toFixed(0)}cm betragen.`,
|
||||||
[FAILED_NUM_RATS]: "Es müssen mindestens 3 Ratten zusammenleben, Paarhaltung ist nicht artgerecht.",
|
[FAILED_NUM_RATS]: "Es müssen mindestens 3 Ratten zusammenleben, Paarhaltung ist nicht artgerecht.",
|
||||||
[FAILED_MINIMUM_LENGTH_LONG_SIDE]: `Die lange Seite des Käfig muss mindestens ${(MINIMUM_LENGTH_LONG_SIDE * 100).toFixed(0)}cm lang sein um Rennen zu ermöglichen.`,
|
[FAILED_LENGTH]: `Eine Seite des Käfig muss mindestens ${(MINIMUM_LENGTH * 100).toFixed(0)}cm lang sein um Rennen zu ermöglichen.`,
|
||||||
[FAILED_MINIMUM_LENGTH_SHORT_SIDE]: `Die kurze Seite des Käfig muss mindestens ${(MINIMUM_LENGTH_SHORT_SIDE * 100).toFixed(0)}cm lang sein.`,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class Dimensions {
|
class Dimensions {
|
||||||
@ -69,12 +66,8 @@ function cageCheck(dimensions, numRats, numFullFloors) {
|
|||||||
failedCriteria[FAILED_FALL_HEIGHT] = FAIL_CRITERIA[FAILED_FALL_HEIGHT];
|
failedCriteria[FAILED_FALL_HEIGHT] = FAIL_CRITERIA[FAILED_FALL_HEIGHT];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dimensions.width < MINIMUM_LENGTH_LONG_SIDE && dimensions.depth < MINIMUM_LENGTH_LONG_SIDE) {
|
if (dimensions.width < MINIMUM_LENGTH && dimensions.depth < MINIMUM_LENGTH) {
|
||||||
failedCriteria[FAILED_MINIMUM_LENGTH_LONG_SIDE] = FAIL_CRITERIA[FAILED_MINIMUM_LENGTH_LONG_SIDE];
|
failedCriteria[FAILED_LENGTH] = FAIL_CRITERIA[FAILED_LENGTH];
|
||||||
}
|
|
||||||
|
|
||||||
if (dimensions.width < MINIMUM_LENGTH_SHORT_SIDE || dimensions.depth < MINIMUM_LENGTH_SHORT_SIDE) {
|
|
||||||
failedCriteria[FAILED_MINIMUM_LENGTH_SHORT_SIDE] = FAIL_CRITERIA[FAILED_MINIMUM_LENGTH_SHORT_SIDE];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dimensions.height / numFullFloors < MINIMUM_FLOOR_HEIGHT) {
|
if (dimensions.height / numFullFloors < MINIMUM_FLOOR_HEIGHT) {
|
||||||
|
@ -144,7 +144,7 @@ label {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 800px) {
|
@media screen and (min-width: 40em) {
|
||||||
flex: 0 1 calc(25% - 0.5em);
|
flex: 0 1 calc(25% - 0.5em);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user