0.1.1 • Published 9 years ago

kenburns-editor v0.1.1

Weekly downloads
1
License
ISC
Repository
github
Last release
9 years ago

kenburns-editor

npm.io

Usages

// ES6
import { KenburnsEditor } from "kenburns-editor";
// CommonJS
var KenburnsEditor = require("kenburns-editor").KenburnsEditor;

kenburns-editor allows to be Controlled: you have to provide values and an onChange handler to enable the edition.

<KenburnsEditor
  image="1.jpg"
  value={this.state.value}
  onChange={value => this.setState({ value })} />

kenburns-editor allows to be Uncontrolled: just define a defaultValues:

<KenburnsEditor
  image="1.jpg"
  defaultValue={{ from: [0.5, [0.5, 0.5]], to: [1, [0.5, 0.5]] }}
  onChange={console.log.bind(console)} />

Example

(click to open) npm.io

Used by...