Skip to content

Commit

Permalink
fix(content): scroll is initialized before subscribing
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Jan 16, 2017
1 parent 60adf7b commit 2ee6c54
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/components/content/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ export class Content extends Ion implements OnDestroy, OnInit {
this._imgReqBfr = config.getNumber('imgRequestBuffer', 1400);
this._imgRndBfr = config.getNumber('imgRenderBuffer', 400);
this._imgVelMax = config.getNumber('imgVelocityMax', 3);
this._scroll = new ScrollView(_plt, _dom);

if (viewCtrl) {
// content has a view controller
Expand All @@ -346,15 +347,9 @@ export class Content extends Ion implements OnDestroy, OnInit {

} else {
// content does not have a view controller
_dom.read(() => {
this._readDimensions();
});
_dom.write(() => {
this._writeDimensions();
});
_dom.read(this._readDimensions.bind(this));
_dom.write(this._writeDimensions.bind(this));
}

this._scroll = new ScrollView(_plt, _dom);
}

/**
Expand Down

0 comments on commit 2ee6c54

Please sign in to comment.