OpenGeoscience/geojs — pull request #182 by jbeezley (2014-08-20 13:55:43+00:00)
Title: Implementing sceneObject.draw for d3 features

In regards to #174. @aashish24 and I discussed this and came to the conclusion that for performance reasons we don't want to automatically redraw the scene on every change. This PR makes explicit the expectation that the features must be drawn manually by providing a `draw` method on every `sceneObject` instance. The base `sceneObject.draw` method calls `draw` on every child in the subtree. This means that `map.draw()` will redraw all layers, `featureLayer.draw()` will redraw all features in the layer, and `feature.draw()` will redraw a single feature. With method chaining, we can do this:

```javascript
var map = geo.map({'node': '#map'});
map.createLayer('osm')
.draw();
map.createLayer('feature')
.createFeature('point')
.positions([])
.style({})
.draw();
```