daily pastebin goal
19%
SHARE
TWEET

Untitled

a guest Dec 13th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. building
  2. floor
  3. office
  4. room
  5.    
  6. id
  7. description
  8. short_description
  9. date_inserted
  10. date_updated
  11. db_primary_key(only upon initialisation)
  12.    
  13. {from:'foo',to:'bar'}
  14.    
  15. var NodeTree = {
  16.         collection:{};//all node objects
  17.         toCreate:{b:[],f:[],o:[],r:[]},//newly created nodes - use ids or the object itself?
  18.         toEdit:{b:[],f:[],o:[],r:[]},//edited attribute of node - use ids or the object itself?
  19.         toDelete:{b:[],f:[],o:[],r:[]},//deleted node from tree - use ids or the object itself?
  20.         create: function(type,node){
  21.             this.toCreate[type].push(node);
  22.         }//function to add created node?
  23.     }
  24.  
  25.   var NodeEdges = {
  26.         collection:[];
  27.         toCreate:{b:[],f:[],o:[],r:[]},
  28.         toEdit:{b:[],f:[],o:[],r:[]},
  29.         toDelete:{b:[],f:[],o:[],r:[]},
  30.         create: function(type,node){
  31.             this.toCreate[type].push(node);
  32.         }
  33.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top