JSPM

ractive-ez-resize

2.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q35273F
  • License WTFPL

Ractive Ez UI Resize Event

Package Exports

  • ractive-ez-resize

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ractive-ez-resize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Ractive Ez Resize

Ez resize event for ractive.js

Detect when an element is resized (this is not the same as the window.resize event, which only triggers when the window is resized).

Demo

Install

npm i ractive-ez-resize
import 'ractive-ez-resize';

Usage

<div on-ezresize="@this.handleResize()" />

Event Properties

  • width: the new width of the element
  • height: the new height of the element
  • oldWidth: the old width of the element
  • oldHeight: the old height of the element