Skip to content
Snippets Groups Projects
  • Jenny Zhang's avatar
    f9e0841b
    Refactor node handling and HTML generation · f9e0841b
    Jenny Zhang authored
    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`.
    f9e0841b
    History
    Refactor node handling and HTML generation
    Jenny Zhang authored
    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`.