Skip to content

Commit 67fcb7c

Browse files
author
Daniel Haehn
committed
Enhance handling the resize event and don't reset window/level or rotation in 2D renderers on resizing.
1 parent b20090a commit 67fcb7c

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

visualization/renderer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ X.renderer.prototype.onResize_ = function() {
305305
}
306306

307307
// .. and re-draw
308-
this.resetViewAndRender();
308+
//this.resetViewAndRender();
309309

310310
};
311311

visualization/renderer2D.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ X.renderer2D.prototype.init = function() {
365365
*/
366366
X.renderer2D.prototype.rotate = function() {
367367

368-
this._camera._view[1]++;
368+
this._camera._view[1]++;
369369

370370
};
371371

@@ -380,6 +380,20 @@ X.renderer2D.prototype.rotateCounter = function() {
380380
};
381381

382382

383+
/**
384+
* @inheritDoc
385+
*/
386+
X.renderer2D.prototype.onResize_ = function() {
387+
388+
// call the super class
389+
goog.base(this, 'onResize_');
390+
391+
// in 2D we also want to perform auto scaling
392+
this.autoScale_();
393+
394+
};
395+
396+
383397
/**
384398
* @inheritDoc
385399
*/

0 commit comments

Comments
 (0)