🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

ember-resize-observer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-resize-observer

Exposes a ResizeObserver polyfill and component mixin for your Ember App

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
1
-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

ember-resize-observer

Adds a polyfill for ResizeObserver to your app, as well as a mixin to watch resizing of components.

Installation

ember install ember-resize-observer

Usage

To watch for resizing of a component element, import and use the mixin.

import Component from '@ember/component';
import ResizeObservable from 'ember-resize-observer/mixins/resize-observable';

export default Component.extend(ResizeObservable, {
  // observedResize will be called any time the component's element is resized
  observedResize() {

  }
});

The mixin also makes use of the init, didInsertElement, and willDestroyElement hooks. If your component makes use of any of these, it's important to remember to call this._super.

Contributing

Installation

  • git clone <repository-url>
  • cd ember-resize-observer
  • npm install

Linting

  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • npm test – Runs ember try:each to test your addon against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visit https://ember-cli.com/.

License

This project is licensed under the MIT License.

Keywords

ember-addon

FAQs

Package last updated on 15 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts