diff --git a/src/components/TextBox.vue b/src/components/TextBox.vue
index 7d7a2d9..80216ac 100644
--- a/src/components/TextBox.vue
+++ b/src/components/TextBox.vue
@@ -1,27 +1,37 @@
-
-
+
+
-
+
-
+
- $emit('edit')">Edit
+ $emit('edit')"
+ >Edit
- $emit('remove')">Remove
+ $emit('remove')"
+ >Remove
diff --git a/src/pages/Editor.vue b/src/pages/Editor.vue
index 3fa1403..5bc9b99 100644
--- a/src/pages/Editor.vue
+++ b/src/pages/Editor.vue
@@ -10,6 +10,8 @@ import Statement from '../components/Statement.vue'
import VarDeclEditor from './VarDeclEditor.vue'
import ExpressionEditor from './ExpressionEditor.vue'
import TextBox from '../components/TextBox.vue'
+import {RichTextBox} from "../types.ts";
+import { stepX, stepY } from "../support/const.ts";
const math = new MathPage(uuidv4())
const statements = ref([])
@@ -95,10 +97,10 @@ const saveNewExpression = (stmt: MathStatement) => {
*/
const richTextStatements = ref([
- { text: "test" },
- { text: "test2" },
- { text: "test3" },
-]);
+ new RichTextBox('newText'),
+ new RichTextBox('newText', 0,100)
+
+ ]);
const richEditModal = ref(false);
const richEditExpression = ref("");
@@ -190,18 +192,21 @@ function richUpdateValue() {
-
+
-
+
+
+
+
@@ -245,12 +250,13 @@ function richUpdateValue() {
-
+
-
+ />
+
+
diff --git a/src/support/const.ts b/src/support/const.ts
new file mode 100644
index 0000000..4d1ef7f
--- /dev/null
+++ b/src/support/const.ts
@@ -0,0 +1,2 @@
+export const stepX = 5
+export const stepY = 5
diff --git a/src/support/parse.ts b/src/support/parse.ts
index f5d96da..b9cf433 100644
--- a/src/support/parse.ts
+++ b/src/support/parse.ts
@@ -269,6 +269,9 @@ export class MathStatement {
/** The raw statement input by the user. */
public readonly raw: string,
+
+ public x: Number = 0,
+ public y: Number = 0,
) {}
/** Parse the raw statement to an AST. */
diff --git a/src/types.ts b/src/types.ts
index c0b76d6..d459c20 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -91,3 +91,14 @@ export interface EvaluationResult {
variables: Record
statements: Record
}
+
+
+export class RichTextBox {
+ constructor(
+ public text: string = '',
+ public x: Number = 0,
+ public y: Number = 0,
+ ) {
+
+ }
+}
\ No newline at end of file