diff --git a/README.md b/README.md index 9d602ba..52e60bf 100644 --- a/README.md +++ b/README.md @@ -288,6 +288,7 @@ Event | Return | Description --- | --- | --- `nodeCreated` | id | `id` of Node `nodeRemoved` | id | `id` of Node + `nodeDataChanged` | id | `id` of Node df-* attributes changed. `nodeSelected` | id | `id` of Node `nodeUnselected` | true | Unselect node `nodeMoved` | id | `id` of Node diff --git a/src/drawflow.js b/src/drawflow.js index 51b1c36..a4c51fc 100644 --- a/src/drawflow.js +++ b/src/drawflow.js @@ -1463,6 +1463,7 @@ export default class Drawflow { target = target[keys[index]]; } target[keys[keys.length - 1]] = event.target.value; + this.dispatch('nodeDataChanged', event.target.closest(".drawflow_content_node").parentElement.id.slice(5)); } } } diff --git a/test.html b/test.html index eba8d42..0cbcf81 100644 --- a/test.html +++ b/test.html @@ -94,6 +94,7 @@