Skip to content

Implement ember modifier which check whether at least part of element is in window

License

Notifications You must be signed in to change notification settings

candunaj/ember-check-viewport

Repository files navigation

ember-check-viewport

Checking visibility of element 60FPS

Installation

ember install ember-check-viewport

Usage

<div {{check-viewport onEnterViewport=(action 'viewportEntered') onExitViewport=(action 'viewportExited') enabled=true}}> ...content </div>

check-viewport mofifier will fire action onEnterViewport if at least part of element is in window. So it is not necessarily visible (because it can be hidden behind another element). But when onExitViewport fires then you can be sure it is not visible. So it can be used for performance purposes.

Contributing

See the Contributing guide for details.

  • git clone <repository-url>
  • cd ember-check-viewport
  • npm install

License

This project is licensed under the MIT License.

About

Implement ember modifier which check whether at least part of element is in window

Resources

License

Stars

Watchers

Forks

Packages

No packages published