Skip to content

Commit

Permalink
Adding the event parameter to most of the callbacks that use the even…
Browse files Browse the repository at this point in the history
…t argument. scniro#88
  • Loading branch information
Anand Sainath committed May 24, 2018
1 parent 1f53c83 commit 16cd388
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
5.0.3
==================
* #88

5.0.2
==================


5.0.1
==================
* #78
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-codemirror2",
"version": "5.0.2",
"version": "5.0.3",
"description": "a tiny react codemirror component wrapper",
"main": "index.js",
"typings": "index.d.ts",
Expand Down
16 changes: 8 additions & 8 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class Shared implements ICommon {
break;
}
case 'onCursor': {
this.editor.on('cursorActivity', (cm) => {
this.editor.on('cursorActivity', (cm, event) => {
this.props.onCursor(this.editor, this.editor.getCursor());
});
}
Expand All @@ -239,13 +239,13 @@ class Shared implements ICommon {
}
break;
case 'onCut': {
this.editor.on('cut', (cm) => {
this.editor.on('cut', (cm, event) => {
this.props.onCut(this.editor, event);
});
break;
}
case 'onDblClick': {
this.editor.on('dblclick', (cm) => {
this.editor.on('dblclick', (cm, event) => {
this.props.onDblClick(this.editor, event);
});
break;
Expand All @@ -257,7 +257,7 @@ class Shared implements ICommon {
}
break;
case 'onDragLeave': {
this.editor.on('dragleave', (cm) => {
this.editor.on('dragleave', (cm, event) => {
this.props.onDragLeave(this.editor, event);
});
break;
Expand All @@ -269,7 +269,7 @@ class Shared implements ICommon {
}
break;
case 'onDragStart': {
this.editor.on('dragstart', (cm) => {
this.editor.on('dragstart', (cm, event) => {
this.props.onDragStart(this.editor, event);
});
break;
Expand Down Expand Up @@ -311,13 +311,13 @@ class Shared implements ICommon {
}
break;
case 'onMouseDown': {
this.editor.on('mousedown', (cm) => {
this.editor.on('mousedown', (cm, event) => {
this.props.onMouseDown(this.editor, event);
});
break;
}
case 'onPaste': {
this.editor.on('paste', (cm) => {
this.editor.on('paste', (cm, event) => {
this.props.onPaste(this.editor, event);
});
break;
Expand All @@ -335,7 +335,7 @@ class Shared implements ICommon {
}
break;
case 'onTouchStart': {
this.editor.on('touchstart', (cm) => {
this.editor.on('touchstart', (cm, event) => {
this.props.onTouchStart(this.editor, event);
});
break;
Expand Down

0 comments on commit 16cd388

Please sign in to comment.