Fixes for activeViewport reactivity
This commit is contained in:
1 parent
3e483cb7a9
commit
7f04f96222
12 files changed
+65
-48
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user