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