renders a visual history based on user responses, using the renderHistory() function in engine.js. This essentially redraws the history after every click using the state array
builds history in the .wand-history ordered list, and pushes all of the node renderings into .wand-node-container - preparing us for styling
starts building out some CSS because I can't stand looking at those un-styled buttons :stuck_out_tongue_winking_eye:
There are two new utility functions as well:
wand.util.getNodeObject(nodeId), which is essentially a node search, that returns the entire node object based on Id - currently used in the history renderings
wand.util.createElem(type, className, innerHTML) for simplifying the DOM element creation process - returns a DOM object
This is a pretty big PR, and @bsmithgall asked me to build off of api. Tests are currently not working, and I would be happy to split this into different PR's for the different features (especially since styles come along with this).
This PR does a few major things:
renderHistory()
function inengine.js
. This essentially redraws the history after every click using the state array.wand-history
ordered list, and pushes all of the node renderings into.wand-node-container
- preparing us for stylingThere are two new utility functions as well:
wand.util.getNodeObject(nodeId)
, which is essentially a node search, that returns the entire node object based on Id - currently used in the history renderingswand.util.createElem(type, className, innerHTML)
for simplifying the DOM element creation process - returns a DOM objectThis is a pretty big PR, and @bsmithgall asked me to build off of
api
. Tests are currently not working, and I would be happy to split this into different PR's for the different features (especially since styles come along with this).