Skip to content

Logic exactly backwards? #11

@bigteejay

Description

@bigteejay

Isn't the logic for this line exactly backwards? Perhaps some of the other related checks too.

l + VISIBLE_PADDING > p.offsetWidth + p.scrollLeft ... return false;

...as l represents the el.offsetLeft and p is it's parent? For example, l in my code is about 950 (px), and p's left is around 600px.

In this case, the function isVisible should instead return true, affirming the checked el is visible given that el's left edge is a greater value (further to the right) than is the parent p (smaller value, closer to the left edge.)

I could understand if the function was isHidden. Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions