Fixes for activeViewport reactivity

This commit is contained in:
Erik Ziegler committed 2015-10-22 11:12:20 +02:00
1 parent 3e483cb7a9
commit 7f04f96222
12 files changed
+65 -48

No files matched your search

+9 -3
View File
@@ -59,9 +59,15 @@ function resizeViewports() {
}
Template.viewer.onCreated(function() {
this.data.activeViewport = new ReactiveVar(0);
this.data.viewportRows = new ReactiveVar(1);
this.data.viewportColumns = new ReactiveVar(2);
if (this.data.activeViewport === undefined) {
this.data.activeViewport = new ReactiveVar(0);
}
if (this.data.viewportRows === undefined) {
this.data.viewportRows = new ReactiveVar(1);
}
if (this.data.viewportColumns === undefined) {
this.data.viewportColumns = new ReactiveVar(2);
}
});
// Avoid doing DOM manipulation during the resize handler