Whoops, typo.
authordsc <dsc@less.ly>
Wed, 22 Feb 2012 16:26:59 +0000 (08:26 -0800)
committerdsc <dsc@less.ly>
Wed, 22 Feb 2012 16:26:59 +0000 (08:26 -0800)
lib/graph.co
lib/main.co

index 680b29c..338c8e2 100644 (file)
@@ -81,7 +81,7 @@ GraphModel = exports.GraphModel = Backbone.Model.extend do # {{{
 # }}}
 
 
-Graph = exports.Graph = Backbone.View.extend do # {{{
+GraphView = exports.GraphView = Backbone.View.extend do # {{{
     ctorName  : 'Graph'
     tagName   : 'section'
     className : 'graph'
index 0e385fa..cda2b9b 100644 (file)
@@ -1,7 +1,7 @@
 _       = require 'kraken/underscore'
 {   Field, FieldList, FieldView, Scaffold
 }       = require 'kraken/scaffold'
-{   Graph, GraphModel,
+{   GraphView, GraphModel,
     GraphOption, GraphOptionList, GraphOptionView,
     GraphOptionsScaffold,
 }       = require 'kraken/graph'
@@ -9,19 +9,19 @@ _       = require 'kraken/underscore'
 
 root = do -> this
 
+# Create the Graph Scaffold
 main = ->
-    graph = root.graph = new Graph do
-        el : $ 'section.graph' .eq 0
-        graph_spec : CHART_OPTIONS_SPEC
+    graph = root.graph = new GraphView { 
+        graph_spec: CHART_OPTIONS_SPEC
+        el: $ 'section.graph' .eq 0
+    }
 
 
 jQuery.ajax do
     url      : '/graph/dygraph-options.json',
     dataType : 'json'
-    
     success : (data) ->
-        CHART_OPTIONS_SPEC = data
+        root.CHART_OPTIONS_SPEC = data
         jQuery main
-    
     error : (err) -> console.error err