File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ def initialize(df=nil, **opts)
2323 width : 400 ,
2424 height : 400
2525 } . merge ( opts )
26+
27+ wh = {
28+ width : @opts [ :width ] ,
29+ height : @opts [ :height ]
30+ }
2631
2732 @xdomain = nil
2833 @ydomain = nil
@@ -39,6 +44,17 @@ def initialize(df=nil, **opts)
3944 @with_layer
4045
4146 ## layers
47+ @stage = ad ::Layers ::Stage . new ( { } )
48+ @context = ad ::Layers ::Context . new ( wh )
49+ @background = ad ::Layers ::Background . new (
50+ {
51+ width : wh [ :width ] +4 ,
52+ height : wh [ :height ] +4 ,
53+ dx : -2 ,
54+ dy : -2
55+ } )
56+ @grid = ad ::Layers ::Grid . new ( wh )
57+
4258 @xscale = ad ::Layers ::Scale . new ( { type : :linear , range : [ 0 , @opts [ :width ] ] } )
4359 @yscale = ad ::Layers ::Scale . new ( { type : :linear , range : [ @opts [ :height ] , 0 ] } )
4460
You can’t perform that action at this time.
0 commit comments