gussmith23 / posit-bisection-viz

10 stars 3 forks source link

Move any posit, viz, etc. code out of index.html -- maximize separation #39

Open gussmith23 opened 5 years ago

gussmith23 commented 5 years ago

I don't think we should be doing any logic other than e.g. setting the highest-level parameters (maybe max n and es?) in index. Ideally, we would just:

  1. Define the bare minimum of parameters
  2. Create the SVG on the page (could be done statically in HTML)
  3. Call a createViz() function, passing in max n, max es, the SVG, and other parameters.
gussmith23 commented 5 years ago

I think there is a lot of separation already, but we could potentially do more. For example, sliders could move into the viz.js file (esp. if we're going to put them inside the circle, which probably means putting them in the SVG).

gussmith23 commented 5 years ago

I think the goal would be to keep any calls to update within viz.js