Permalink
Browse files

Merge pull request #169 from codyebberson/cody-renderer-resize

Exposing 'resize' function on renderers
  • Loading branch information...
2 parents 3b040f2 + dd03cea commit 2a7f213256ac09fd954f627fffa8a01358a86554 Daniel Haehn committed May 4, 2015
Showing with 10 additions and 0 deletions.
  1. +8 −0 visualization/renderer.js
  2. +1 −0 visualization/renderer2D.js
  3. +1 −0 visualization/renderer3D.js
@@ -406,6 +406,14 @@ X.renderer.prototype.onHover_ = function(event) {
* @protected
*/
X.renderer.prototype.onResize_ = function() {
+ this.resize();
+};
+
+
+/**
+ * Resizes the control to fit the size of the container.
+ */
+X.renderer.prototype.resize = function() {
// grab the new width and height of the container
var container = goog.dom.getElement(this._container);
@@ -1400,3 +1400,4 @@ goog.exportSymbol('X.renderer2D.prototype.destroy',
goog.exportSymbol('X.renderer2D.prototype.onSliceNavigation', X.renderer2D.prototype.onSliceNavigation);
goog.exportSymbol('X.renderer2D.prototype.afterRender', X.renderer2D.prototype.afterRender);
+goog.exportSymbol('X.renderer2D.prototype.resize', X.renderer2D.prototype.resize);
@@ -2416,3 +2416,4 @@ goog.exportSymbol('X.renderer3D.prototype.resetViewAndRender',
goog.exportSymbol('X.renderer3D.prototype.pick', X.renderer3D.prototype.pick);
goog.exportSymbol('X.renderer3D.prototype.pick3d', X.renderer3D.prototype.pick3d);
goog.exportSymbol('X.renderer3D.prototype.afterRender', X.renderer3D.prototype.afterRender);
+goog.exportSymbol('X.renderer3D.prototype.resize', X.renderer3D.prototype.resize);

0 comments on commit 2a7f213

Please sign in to comment.