Swarthmore / litterfall

Application and Scripts used for the Litterfall Project
0 stars 1 forks source link

Modify the add new sub-tree function to accommodate the delete tree function #18

Closed zafire06 closed 11 years ago

zafire06 commented 11 years ago

The problem is twofold. Or maybe three.

  1. Since the original add sub-tree function is written with the assumption that all the sub-trees under the same tree_id must be next to each other. We (meaning Jocelyn and I) also assumed that the trees will be sorted so that the max sub_tree_id will be the last row of the sub-tree cluster. However, since the treeRows are sorted by their angles, the two assumptions above do not necessarily hold.
  2. Once I delete the treeRow indicated as the row after which the newSubTreeRow will be placed (by using jQuery's fadeOut and then .remove()), the method for adding a new sub-tree will fail to find the right element after which to append the newSubTreeRow, causing the add new sub-tree function to be dysfunctional.

(Well, it's two after all.)

zafire06 commented 11 years ago

Also, I don't know how to work around the authentication as regards removing a tree.