Skip to content

Commit

Permalink
Fire actionPerformed event
Browse files Browse the repository at this point in the history
ButtonImage and ButtonCameraImage should fire
actionPerformed event on finishing the action.

Fixes #163
  • Loading branch information
ipeychev committed Apr 10, 2015
1 parent e1d035b commit 72010ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/ui/react/src/components/buttons/button-camera-image.jsx
Expand Up @@ -96,9 +96,11 @@

editor.insertElement(el);

editor.fire('imageCameraAdd', el);

this.props.cancelExclusive();

editor.fire('actionPerformed', this);

editor.fire('imageCameraAdd', el);
}
},

Expand Down
4 changes: 3 additions & 1 deletion src/ui/react/src/components/buttons/button-image.jsx
Expand Up @@ -62,12 +62,14 @@

editor.insertElement(el);

editor.fire('actionPerformed', this);

var imageData = {
el: el,
file: inputEl.files[0]
};

editor.fire('imageadd', imageData);
editor.fire('imageAdd', imageData);
}.bind(this);

reader.readAsDataURL(inputEl.files[0]);
Expand Down

0 comments on commit 72010ff

Please sign in to comment.