Skip to content

Commit

Permalink
fix: fix event return value
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Dec 12, 2019
1 parent 0db9126 commit af11e27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Moveable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ class Moveable extends EgComponent implements MoveableInterface {
const events: any = {};

EVENTS.forEach(name => {
events[camelize(`on ${name}`)] = (e: any) => this.trigger(name, e);
events[camelize(`on ${name}`)] = (e: any) => {
if (this.trigger(name, e) === false) {
e.stop();
}
};
});

render(
Expand Down

0 comments on commit af11e27

Please sign in to comment.