1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
node-red/packages/node_modules/@node-red
Nick O'Leary 373267c53b
Add more consistent events in the editor
This introduces a much more consistent set of events within the editor
for whenever a element is added, removed or modified.

The events emited on the `RED.events` event system. The event names
take the form: `"<thing>:<action>"`.

`<thing>` can be one of:
 - nodes
 - flows
 - subflows
 - groups
 - links

`<action>` can be one of:
 - add
 - remove
 - change

The payload of the events is the object in question.

There is also:
 - flows:reorder    - when tabs are reordered. Payload is array of flow ids.
 - workspace:clear  - when the workspace is emptied - part of switching projects

The `nodes:change` event was already used by RED.nodes.dirty() to cause
the Deploy button to become active. This renames that event to:
 - workspace:dirty  - Payload is boolean flag for the dirty state

This commit also updates the Palette to use the subflows:change event to
only redraw subflows that have actually changed rather than refresh them
all whenever one of them *might* have changed. This removes a noticable
flicker of the icon which was needlessly being redrawn.
2020-04-20 22:23:34 +01:00
..
editor-api Bump dev branch to 1.1.0 2020-04-06 20:29:22 +01:00
editor-client Add more consistent events in the editor 2020-04-20 22:23:34 +01:00
nodes Merge branch 'dev' of github.com:node-red/node-red into dev 2020-04-20 21:57:46 +01:00
registry Bump dev branch to 1.1.0 2020-04-06 20:29:22 +01:00
runtime Bump dev branch to 1.1.0 2020-04-06 20:29:22 +01:00
util Bump dev branch to 1.1.0 2020-04-06 20:29:22 +01:00