Socket
Book a DemoInstallSign in
Socket

ember-resize-aware

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-resize-aware

Ember Component mixin to notify of size changes.

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
297
34.39%
Maintainers
1
Weekly downloads
 
Created
Source

ember-resize-aware

Greenkeeper badge

Build Status

npm version

Checkout the DEMO

Simplified and updated version of ember-resize. Provides a mixin that you can use on your components, your components will have a didResize event called on them when appropriate.

Uses ember-singularity under the hood for efficient and massively gangster event handling.

Installation

ember install ember-resize-aware

Usage

Just mix this sucker into a component or any ember object with the didInsertElement lifecycle hooks.

import Component from '@ember/component';
import ResizeAware from 'ember-resize-aware/mixins/resize-aware';

export default Component.extend(ResizeAware, {
  debounceRate: 400, // You can optionally set the debounce rate, the default is 200, 0 during testing.

  didResize(width, height) {
    // YOU GET THE WIDTH! AND THE HEIGHT! BOOM!
  },
});

Contributing

Installation

  • git clone <repository-url>
  • cd ember-resize-aware
  • yarn install

Linting

  • yarn lint:js
  • yarn 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"
  • yarn 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 10 Aug 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