Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.17 KB

README.md

File metadata and controls

35 lines (23 loc) · 1.17 KB

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.