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`.
Please register or sign in to comment