Merge branch 'main' into qi
This commit is contained in:
commit
5dc568bc86
@ -1,12 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { RichTextBox } from "../types.ts";
|
import { RichTextBox } from "../support/types";
|
||||||
import { stepX, stepY } from "../support/const.ts";
|
import { stepX, stepY } from "../support/const";
|
||||||
const props = defineProps({
|
const props = defineProps<{value: RichTextBox}>();
|
||||||
value: {
|
|
||||||
type: RichTextBox,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {EvaluationResult, Maybe} from '../types'
|
import {EvaluationResult, Maybe} from '../support/types'
|
||||||
import {MathStatement} from '../support/parse'
|
import {MathStatement} from '../support/parse'
|
||||||
import {computed} from 'vue'
|
import {computed} from 'vue'
|
||||||
import Katex from './Katex.vue'
|
import Katex from './Katex.vue'
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { RichTextBox } from "../types.ts";
|
import { RichTextBox } from "../support/types";
|
||||||
import { stepX, stepY } from "../support/const.ts";
|
import { stepX, stepY } from "../support/const";
|
||||||
const props = defineProps({
|
const props = defineProps<{value: RichTextBox}>();
|
||||||
value: {
|
|
||||||
type: RichTextBox,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -101,10 +101,10 @@ const makeNewRichTextBox = () => {
|
|||||||
richEditID.value = richTextStatements.value.length - 1;
|
richEditID.value = richTextStatements.value.length - 1;
|
||||||
richEditExpression.value = richTextStatements.value[richEditID.value].text;
|
richEditExpression.value = richTextStatements.value[richEditID.value].text;
|
||||||
richEditModal.value = true;
|
richEditModal.value = true;
|
||||||
console.log("editing statement", id, richEditModal);
|
console.log("editing statement",richEditID.value, richEditModal);
|
||||||
};
|
};
|
||||||
|
|
||||||
const richTextStatements = ref([]);
|
const richTextStatements = ref([new RichTextBox("Hello World")]);
|
||||||
|
|
||||||
const richEditModal = ref(false);
|
const richEditModal = ref(false);
|
||||||
const richEditExpression = ref("");
|
const richEditExpression = ref("");
|
||||||
|
@ -3,7 +3,7 @@ import {defineEmits, ref} from 'vue'
|
|||||||
import {MathStatement} from '../support/parse'
|
import {MathStatement} from '../support/parse'
|
||||||
import Katex from '../components/Katex.vue'
|
import Katex from '../components/Katex.vue'
|
||||||
import { v4 as uuidv4 } from 'uuid'
|
import { v4 as uuidv4 } from 'uuid'
|
||||||
import {StatementID} from '../types'
|
import {StatementID} from '../support/types'
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(eventName: 'save', statement: MathStatement): void
|
(eventName: 'save', statement: MathStatement): void
|
||||||
|
@ -3,7 +3,7 @@ import {ref} from 'vue'
|
|||||||
import {MathStatement} from '../support/parse'
|
import {MathStatement} from '../support/parse'
|
||||||
import {v4 as uuidv4} from 'uuid'
|
import {v4 as uuidv4} from 'uuid'
|
||||||
import Katex from '../components/Katex.vue'
|
import Katex from '../components/Katex.vue'
|
||||||
import {StatementID} from '../types'
|
import {StatementID} from '../support/types'
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(eventName: 'save', statement: MathStatement): void,
|
(eventName: 'save', statement: MathStatement): void,
|
||||||
|
@ -270,8 +270,8 @@ export class MathStatement {
|
|||||||
/** The raw statement input by the user. */
|
/** The raw statement input by the user. */
|
||||||
public readonly raw: string,
|
public readonly raw: string,
|
||||||
|
|
||||||
public x: Number = 0,
|
public x: number = 0,
|
||||||
public y: Number = 0,
|
public y: number = 0,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
/** Parse the raw statement to an AST. */
|
/** Parse the raw statement to an AST. */
|
||||||
|
@ -96,8 +96,8 @@ export interface EvaluationResult {
|
|||||||
export class RichTextBox {
|
export class RichTextBox {
|
||||||
constructor(
|
constructor(
|
||||||
public text: string = '',
|
public text: string = '',
|
||||||
public x: Number = 0,
|
public x: number = 0,
|
||||||
public y: Number = 0,
|
public y: number = 0,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user