Skip to content
Snippets Groups Projects
Commit f9e0841b authored by Jenny Zhang's avatar Jenny Zhang
Browse files

Refactor node handling and HTML generation

1. Added `topsString` variable:
   - This variable is used to pass the top formula from the dialog.

2. Added unique ID attribute to node HTML:
   - Each node now has a unique ID to facilitate inserting new top nodes' HTML.
   - Created a new variable `topsElementId` to represent the location where new nodes will be inserted. This ID is determined in the `turnstileFunction()`.

3. Removed original `addNodeToTop` function from `sequentAst.js`:
   - The logic previously in `addNodeToTop` has been moved to the `handleSubmitAnswer` function in `App.vue`.

4. Renamed `generateProofTreeHTML` to `generateNodeHTML` in `sequentAst.js`:
   - The new `generateNodeHTML` function now only generates the node and `bottomLatex`.
   - The rule and the bar are now generated in the `handleSubmitAnswer()` function in `App.vue`.

5. Enhanced `handleSubmitAnswer()` function in `App.vue`:
   - This function now also handles the insertion of the new node HTML into the target `tops`.
parent 9e66c31b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment