Closed curran closed 8 years ago
Currently, the Chiasm constructor expects a DOM element. This means that writing code to use Chiasm involves something like this:
var containerDiv = document.getElementById("chiasm-container"); var chiasm = Chiasm(containerDiv);
It would be nicer to be able to simply pass a selector string into the constructor, like this:
var chiasm = Chiasm("#chiasm-container");
Both of the above snippets should work for instantiating Chiasm.
Decided against this strategy, and instead solved the issue by making containerSelector a public property in chiasm-layout.
containerSelector
Currently, the Chiasm constructor expects a DOM element. This means that writing code to use Chiasm involves something like this:
It would be nicer to be able to simply pass a selector string into the constructor, like this:
Both of the above snippets should work for instantiating Chiasm.