Skip to content

Commit

Permalink
Implement #set_background.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoglan committed Nov 30, 2010
1 parent 8f0a533 commit 6ecab5b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions site/src/pages/api.haml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@

Replaces all the colors in the graph with the array @color_list@.

h4. @g.set_background(options)@

Can be used to just set the background color if you don't want to set all the colors
through @g.set_theme()@. For example, @g.set_background({colors: ['#d1edf5', 'white']})@.

h4. @g.set_font(font)@

Sets the font used to render textual content. Arial is used by default; bear in mind you
Expand Down
9 changes: 9 additions & 0 deletions source/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,15 @@ Bluff.Base = new JS.Class({
this._render_background();
},

// Set just the background colors
set_background: function(options) {
if (options.colors)
this._theme_options.background_colors = options.colors;
if (options.image)
this._theme_options.background_image = options.image;
this._render_background();
},

// A color scheme similar to the popular presentation software.
theme_keynote: function() {
// Colors
Expand Down

0 comments on commit 6ecab5b

Please sign in to comment.