From 159ccfc879568ad0b1c520019deb9ff488ea6d85 Mon Sep 17 00:00:00 2001 From: jlukic Date: Mon, 11 May 2015 15:09:51 -0400 Subject: [PATCH] #1724, make sure any method invocation forces position recalculation in visibility api --- src/definitions/behaviors/visibility.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/definitions/behaviors/visibility.js b/src/definitions/behaviors/visibility.js index 4a090f983..699c230c1 100644 --- a/src/definitions/behaviors/visibility.js +++ b/src/definitions/behaviors/visibility.js @@ -409,7 +409,7 @@ $.fn.visibility = function(parameters) { amountInPixels ; // assign callback - if(amount !== undefined && newCallback !== undefined) { + if(amount && newCallback) { settings.onPassed[amount] = newCallback; } else if(amount !== undefined) { @@ -1057,6 +1057,8 @@ $.fn.visibility = function(parameters) { if(instance === undefined) { module.initialize(); } + instance.save.scroll(); + instance.save.calculations(); module.invoke(query); } else {