Skip to content

Commit

Permalink
Always digest when resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
widmoser committed Jun 29, 2016
1 parent 8325b1d commit 244d40f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/tileview.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,16 +257,16 @@
renderedStartRow = startRow;
renderedEndRow = endRow;
}
function resize(withDigest) {
function resize() {
var newComponentSize = container[0].getBoundingClientRect();
if (newComponentSize.width !== componentWidth || newComponentSize.height !== componentHeight) {
if (layout(false) && withDigest === true) {
if (layout(false)) {
forEachElement(function (el) { return el.scope().$digest(); });
}
}
}
function onResize() {
resize(true);
resize();
}
function measure() {
var rect = container[0].getBoundingClientRect();
Expand Down
6 changes: 3 additions & 3 deletions src/tileview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,17 +294,17 @@ declare const angular: any;
renderedEndRow = endRow;
}

function resize(withDigest) {
function resize() {
const newComponentSize = container[0].getBoundingClientRect();
if (newComponentSize.width !== componentWidth || newComponentSize.height !== componentHeight) {
if (layout(false) && withDigest === true) {
if (layout(false)) {
forEachElement(el => el.scope().$digest());
}
}
}

function onResize() {
resize(true);
resize();
}

function measure() {
Expand Down

0 comments on commit 244d40f

Please sign in to comment.