Skip to content

Commit

Permalink
Add no-op viewport method to headless view.
Browse files Browse the repository at this point in the history
  • Loading branch information
jheer committed May 7, 2013
1 parent 720754f commit 75c47d6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/headless/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ vg.headless.View = (function() {
return this;
};

prototype.viewport = function() {
if (!arguments.length) return null;
return this;
};

prototype.defs = function(defs) {
if (!arguments.length) return this._model.defs();
this._model.defs(defs);
Expand Down
5 changes: 5 additions & 0 deletions vega.js
Original file line number Diff line number Diff line change
Expand Up @@ -5769,6 +5769,11 @@ vg.headless = {};vg.headless.View = (function() {
return this;
};

prototype.viewport = function() {
if (!arguments.length) return null;
return this;
};

prototype.defs = function(defs) {
if (!arguments.length) return this._model.defs();
this._model.defs(defs);
Expand Down
Loading

0 comments on commit 75c47d6

Please sign in to comment.