mirror of
https://git.srhtnin.garden/sarah/srhtnin.github.io.git
synced 2026-10-14 10:48:12 +02:00
Added neat preview to plots for mutations using lists.
This commit is contained in:
1 parent
d9bdd74b02
commit
495e1a230a
7 files changed
+680
-28
No files matched your search
@@ -2032,16 +2032,24 @@ function ResizeAdminMutationRecipe() {
|
||||
|
||||
|
||||
function RenderAdminMutationGrids() {
|
||||
const ListOffsets =
|
||||
CreateMutationRecipePreviewOffsets(
|
||||
AdminMutationPattern,
|
||||
AdminMutationResult
|
||||
);
|
||||
|
||||
RenderAdminMutationGrid(
|
||||
"AdminMutationPatternGrid",
|
||||
"Pattern",
|
||||
AdminMutationPattern
|
||||
AdminMutationPattern,
|
||||
ListOffsets.Pattern
|
||||
);
|
||||
|
||||
RenderAdminMutationGrid(
|
||||
"AdminMutationResultGrid",
|
||||
"Result",
|
||||
AdminMutationResult
|
||||
AdminMutationResult,
|
||||
ListOffsets.Result
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2049,7 +2057,8 @@ function RenderAdminMutationGrids() {
|
||||
function RenderAdminMutationGrid(
|
||||
ContainerId,
|
||||
Mode,
|
||||
Matrix
|
||||
Matrix,
|
||||
ListOffsets
|
||||
) {
|
||||
const Grid =
|
||||
document.getElementById(
|
||||
@@ -2080,7 +2089,8 @@ function RenderAdminMutationGrid(
|
||||
Mode,
|
||||
X,
|
||||
Y,
|
||||
Matrix[Y][X]
|
||||
Matrix[Y][X],
|
||||
ListOffsets?.[Y]?.[X]
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -2092,7 +2102,8 @@ function CreateAdminMutationGridCell(
|
||||
Mode,
|
||||
X,
|
||||
Y,
|
||||
Value
|
||||
Value,
|
||||
ListOffset
|
||||
) {
|
||||
const Button =
|
||||
document.createElement(
|
||||
@@ -2167,6 +2178,24 @@ function CreateAdminMutationGridCell(
|
||||
Button.title =
|
||||
Display.Label;
|
||||
|
||||
const ListNumber =
|
||||
GetMutationRecipePreviewListReference(
|
||||
Value
|
||||
);
|
||||
|
||||
if (ListNumber !== null) {
|
||||
RegisterMutationRecipePreviewListCell(
|
||||
Button,
|
||||
AdminMutationLists[
|
||||
ListNumber - 1
|
||||
],
|
||||
ListNumber,
|
||||
ListOffset,
|
||||
AdminMutationPlantCatalogue,
|
||||
"GuideRecipeLabel"
|
||||
);
|
||||
}
|
||||
|
||||
Button.addEventListener(
|
||||
"click",
|
||||
() => {
|
||||
|
||||
Reference in new issue
Block a user