Skip to content
Snippets Groups Projects
Commit ee6fbab9 authored by sensei's avatar sensei
Browse files

add old version commented out

parent 26bb4899
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@
__pycache__/
*.py[cod]
*$py.class
*.swp
*.swo
# C extensions
*.so
......@@ -89,4 +91,4 @@ ENV/
.ropeproject
# Start.tw
src/config/start.tw
\ No newline at end of file
src/config/start.tw
......@@ -6,17 +6,14 @@ var lastActiveSlave, lastSlaves, lastPC;
/*
To use, add something like:
<div id='familyTree'>
</div>
<<run updateFamilyTree($activeSlave, $slaves, $PC)>>
<script>updateFamilyTree()</script>
If you want to update the tree, just re-call the run line.
If there's no active slave, you can do:
<<run updateFamilyTree(null, $slaves, $PC)>>
<div id="familyTree"></div>
<span id="familyTreeLink">
<<link "Pull up the file on her family tree.">>
<<replace #familyTreeLink>>
<<run renderFamilyTree($slaves, $activeSlave.ID)>>
<</replace>>
<</link>>
</span>
*/
......@@ -437,6 +434,20 @@ window.buildFamilyTree = function(slaves = SugarCube.State.variables.slaves, fil
return family_graph;
};
/*Old version. To use, do something like:
<div id="editFamily">
<div id="graph"></div>
</div>
<<run updateFamilyTree($activeSlave, $slaves, $PC)>>
<script>updateFamilyTree()</script>
If you want to update the tree, just re-call the run line.
If there's no active slave, you can do:
<<run updateFamilyTree(null, $slaves, $PC)>>
*/
window.updateFamilyTree = function(activeSlave = lastActiveSlave, slaves = lastSlaves, PC = lastPC) {
lastActiveSlave = activeSlave;
lastSlaves = slaves;
......
......@@ -437,6 +437,17 @@ __Rumors__
<</link>>
</span>
</span>
/*Old version
<span id="family">
<<link "Pull up the file on your family tree.">>
<<replace #family>>
<div id="editFamily"><div id="graph"></div></div>
<<run updateFamilyTree(null, $slaves, $PC)>>
<script>updateFamilyTree()</script>
<</replace>>
<</link>>
</span>
*/
<<if totalPlayerRelatives($PC) > 0>>
<<PlayerFamily>>
<</if>>
......
......@@ -351,6 +351,17 @@
<</link>>
</span>
</span>
/* Old version
<span id="family">
<<link "Pull up the file on her family tree.">>
<<replace #family>>
<div id="editFamily"><div id="graph"></div></div>
<<run updateFamilyTree($activeSlave, $slaves, $PC)>>
<script>updateFamilyTree()</script>
<</replace>>
<</link>>
</span>
*/
<</if>>
<<if $universalRulesImpregnation == "HG">>
......
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