Skip to content

Commit

Permalink
build new version. fixes #56.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosch committed Aug 23, 2015
1 parent 01797ec commit 222e209
Show file tree
Hide file tree
Showing 4 changed files with 623 additions and 254 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion example/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,20 @@ var App = React.createClass({
this.setState({scale: scale})
},

logCallback: function(e) {
console.log("callback", e);
},

render: function() {
return <div>
<Editor ref="avatar" rotation={this.state.rotation} scale={parseFloat(this.state.scale)} onSave={this.handleSave} image="example/avatar.jpg" />
<Editor
ref="avatar"
scale={parseFloat(this.state.scale)}
onSave={this.handleSave}
onLoadFailed={this.logCallback.bind(this, 'onLoadFailed')}
onUpload={this.logCallback.bind(this, 'onUpload')}
onImageLoad={this.logCallback.bind(this, 'onImageLoad')}
image="example/avatar.jpg" />
<br />
<input name="scale" type="range" ref="scale" onChange={this.handleScale} min="1" max="2" step="0.01" defaultValue="1" />
<br />
Expand Down
Loading

0 comments on commit 222e209

Please sign in to comment.