[#212,views][s]: refactor views and tutorial so that no render call in initialize and view element can be passed in externally (fixes #212).

This commit is contained in:
Rufus Pollock
2012-08-15 12:33:59 +01:00
parent c75e31a856
commit bc414e9f8c
5 changed files with 16 additions and 24 deletions

View File

@@ -156,6 +156,7 @@ var graph = new recline.View.Graph({
}
});
$el.append(graph.el);
graph.render();
graph.redraw();
{% endhighlight %}
@@ -174,6 +175,7 @@ var graph = new recline.View.Graph({
}
});
$el.append(graph.el);
graph.render();
graph.redraw();
</script>
@@ -213,7 +215,7 @@ var map = new recline.View.Map({
model: dataset
});
$el.append(map.el);
map.redraw();
map.render();
{% endhighlight %}
<div id="mymap">&nbsp;</div>