From 243c8f44dbcf91938deeabc3bf90d36040cde7de Mon Sep 17 00:00:00 2001 From: ucrhh Date: Fri, 29 Jan 2021 10:16:00 +0100 Subject: [PATCH] fix build warning lit-element not found --- .../view/content/infocontent/StartPageView.java | 12 ++++++++---- .../typeinferencecontent/MathjaxProofTree.java | 2 ++ .../typeinferencecontent/MathjaxUnification.java | 1 + .../edu/kit/typicalc/view/main/MathjaxDisplay.java | 1 + 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/edu/kit/typicalc/view/content/infocontent/StartPageView.java b/src/main/java/edu/kit/typicalc/view/content/infocontent/StartPageView.java index ee59752..96c68f7 100644 --- a/src/main/java/edu/kit/typicalc/view/content/infocontent/StartPageView.java +++ b/src/main/java/edu/kit/typicalc/view/content/infocontent/StartPageView.java @@ -22,6 +22,7 @@ public class StartPageView extends VerticalLayout implements ControlPanelView { private final Div content; private final ControlPanel controlPanel; + MathjaxProofTree mjxPT; public StartPageView() { // todo implement correctly @@ -44,8 +45,8 @@ public class StartPageView extends VerticalLayout implements ControlPanelView { content.add(new MathjaxUnification("\\(conswwwwwwWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" + "WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW" + "WWWWWWWWWWWWWWWWWWWWWtraint test \\vdash \\)")); - MathjaxProofTree mjxPT = new MathjaxProofTree(getTranslation("demo-tree")); - mjxPT.showStep(10); + mjxPT = new MathjaxProofTree(getTranslation("demo-tree")); + content.add(mjxPT); content.add(new MathjaxProofTree(getTranslation("demo-tree"))); content.add(new MathjaxProofTree(getTranslation("demo-tree"))); content.add(new MathjaxProofTree(getTranslation("demo-tree"))); @@ -53,8 +54,9 @@ public class StartPageView extends VerticalLayout implements ControlPanelView { } private void disableControlPanel() { - controlPanel.setEnabledFirstStep(false); - controlPanel.setEnabledLastStep(false); + // todo disable everything +// controlPanel.setEnabledFirstStep(false); +// controlPanel.setEnabledLastStep(false); controlPanel.setEnabledNextStep(false); controlPanel.setEnabledPreviousStep(false); controlPanel.setEnabledShareButton(false); @@ -66,10 +68,12 @@ public class StartPageView extends VerticalLayout implements ControlPanelView { @Override public void firstStepButton() { + mjxPT.showStep(0); } @Override public void lastStepButton() { + mjxPT.showStep(5); } @Override diff --git a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/MathjaxProofTree.java b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/MathjaxProofTree.java index c2b3f8b..ce0c806 100644 --- a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/MathjaxProofTree.java +++ b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/MathjaxProofTree.java @@ -14,6 +14,7 @@ import edu.kit.typicalc.view.MathjaxAdapter; * with MathJax. */ @Tag("tc-proof-tree") +@JsModule("./src/mathjax-adapter.ts") @JsModule("./src/mathjax-proof-tree.ts") public class MathjaxProofTree extends LitTemplate implements MathjaxAdapter { @@ -26,6 +27,7 @@ public class MathjaxProofTree extends LitTemplate implements MathjaxAdapter { * Creates a new HTML element that renders the proof tree and cuts it into steps. * The latex String must consist of exactly one proof tree environment in order for * this element to work. In other cases the expected behaviour is undefined. + * * @param latex the LaTeX-String to render with MathJax */ public MathjaxProofTree(String latex) { diff --git a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/MathjaxUnification.java b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/MathjaxUnification.java index 668d70e..3995ea2 100644 --- a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/MathjaxUnification.java +++ b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/MathjaxUnification.java @@ -13,6 +13,7 @@ import edu.kit.typicalc.view.MathjaxAdapter; * step-revealing capabilities. Relies on MathjaxUnificationJS to interact with MathJax. */ @Tag("tc-unification") +@JsModule("./src/mathjax-adapter.ts") @JsModule("./src/mathjax-unification.ts") public class MathjaxUnification extends LitTemplate implements MathjaxAdapter { diff --git a/src/main/java/edu/kit/typicalc/view/main/MathjaxDisplay.java b/src/main/java/edu/kit/typicalc/view/main/MathjaxDisplay.java index cb5cb74..c99c410 100644 --- a/src/main/java/edu/kit/typicalc/view/main/MathjaxDisplay.java +++ b/src/main/java/edu/kit/typicalc/view/main/MathjaxDisplay.java @@ -12,6 +12,7 @@ import edu.kit.typicalc.view.MathjaxAdapter; * with MathJax. */ @Tag("tc-display") +@JsModule("./src/mathjax-adapter.ts") @JsModule("./src/mathjax-display.ts") public class MathjaxDisplay extends LitTemplate implements MathjaxAdapter {