You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initialising a monitor on DomContentLoaded the state is correctly identified in stateChange. However, adding a callback for fullyEnterViewport is also triggered for each item. I would have expected that to fire only for items actually moving into the viewport.
Illustrated here, with console output: https://jsfiddle.net/ExternalUse/17wL9pxv/9/
In entryChangeState, this produces correct results:
`else if (this.isFullyInViewport):
guid1is correctly considered fully entered here
guid2is correctly considered fully entered here for the fullyEnteredCallback
function entryFullyEnterViewport() {
console.log(this.watchItem.id + " may to be incorrectly considered fully entered, this.isFullyInViewport is " + this.isFullyInViewport);
} this is produced:
guid1 may to be incorrectly considered fully entered, this.isFullyInViewport is true
guid2 may to be incorrectly considered fully entered, this.isFullyInViewport is false
guid3 may to be incorrectly considered fully entered, this.isFullyInViewport is false
guid4 may to be incorrectly considered fully entered, this.isFullyInViewport is false
`
...
It's also slightly weird that in stateChange, guid1 and 2 are caught by fullyEntered; in the fullyEntered callback only guid1 has isFullyInViewport == true.
Also, for the first element (guid1) the log message is produced twice.
I'm probably missing a trick, could you possibly help, please?
Thank you very much.
The text was updated successfully, but these errors were encountered:
Initialising a monitor on DomContentLoaded the state is correctly identified in stateChange. However, adding a callback for fullyEnterViewport is also triggered for each item. I would have expected that to fire only for items actually moving into the viewport.
Illustrated here, with console output:
https://jsfiddle.net/ExternalUse/17wL9pxv/9/
In entryChangeState, this produces correct results:
`else if (this.isFullyInViewport):
It's also slightly weird that in stateChange, guid1 and 2 are caught by fullyEntered; in the fullyEntered callback only guid1 has isFullyInViewport == true.
Also, for the first element (guid1) the log message is produced twice.
I'm probably missing a trick, could you possibly help, please?
Thank you very much.
The text was updated successfully, but these errors were encountered: