Skip to content

Commit

Permalink
v1.0.0-beta.2, add event
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni55aN committed Oct 27, 2018
1 parent 322945c commit aecc51f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rete",
"version": "1.0.0-beta.1",
"version": "1.0.0-beta.2",
"description": "JavaScript framework",
"main": "build/rete.min.js",
"types": "src/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export class EditorEvents extends Events {
translatenode: [],
nodetranslate: [],
nodetranslated: [],
nodedraged: [],
selectnode: [],
nodeselect: [],
nodeselected: [],
Expand Down
4 changes: 3 additions & 1 deletion src/view/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ export class Node extends Emitter {
this.el.addEventListener('contextmenu', e => this.trigger('contextmenu', { e, node: this.node }));

this._startPosition = null;
this._drag = new Drag(this.el, this.onTranslate.bind(this), this.onSelect.bind(this));
this._drag = new Drag(this.el, this.onTranslate.bind(this), this.onSelect.bind(this), () => {
this.trigger('nodedraged', node);
});

this.trigger('rendernode', {
el: this.el,
Expand Down

0 comments on commit aecc51f

Please sign in to comment.