Commit Graph

72 Commits

Author SHA1 Message Date
Nick O'Leary 7bd0ca2212
Handle nodes with invalid z property
Closes #2170
2020-09-03 18:31:33 +01:00
Nick O'Leary d590bbdd2c
Fix copy/paste of nested groups 2020-08-04 20:59:51 +01:00
Nick O'Leary 7f671c9f3f
Ensure unknown nodes removed from outliner when node registers
Fixes #2646
2020-07-10 20:00:18 +01:00
Nick O'Leary 979c5351a8
Ensure node/group xrefs are consistent on import 2020-07-10 15:59:28 +01:00
Nick O'Leary 11ac8fbf13
Ensure groups are removed when deleting subflows 2020-07-07 18:23:42 +01:00
Nick O'Leary 6c04402a98
Prevent wiring to node with no corresponding port
Fixes #2641
2020-07-06 17:32:44 +01:00
Nick O'Leary ef7c9b5c2a
Get group order right in history events to ensure proper handling 2020-07-06 16:00:15 +01:00
Nick O'Leary c061487a16
Massively reduce our dependency on d3 to render the view
This is a slightly scary set of changes to be making. It overhauls
how the view is rendered.

Rather than use d3 for every single part of generating the view,
we new use native DOM functions as much as possible.

d3 is still used for the basic heavy lifting of working out what
nodes/links etc need to be added/removed from the view. But once
it comes to rendering them, d3 is side-lined as much as possible.

There's room for further improvement. This change focusses on Nodes
and Links. It has not touched groups, subflow-ports and link-nodes.
2020-06-10 00:45:20 +01:00
Nick O'Leary 21866634b3
Track subflow instances on the subflow node itself 2020-06-08 11:49:43 +01:00
Nick O'Leary b4b2729e96
Do a sync-redraw after clearing to ensure clean state 2020-06-05 16:56:12 +01:00
Nick O'Leary 4c28b5b227
Only validate nodes once they have all been imported
This ensures any checks for dependent config nodes will pass
2020-06-04 17:06:29 +01:00
Nick O'Leary a7a949377b
Ensure configNode.users is updated properly on import 2020-06-04 17:06:11 +01:00
Nick O'Leary efecfa328b
Fix up event handling when deleting groups and tabs 2020-06-03 14:23:26 +01:00
Hiroyasu Nishiyama 2343fbd86a add variable declaration to prohibit jshint error 2020-05-20 13:47:56 +09:00
Nick O'Leary fe1f8ca0a8
Delay when nodes are added to internal model on import
Closes #2567

This ensures when the node:added event fires, all possible
changes have already been applied such as remapping node ids.

This avoids the need to emit a separate node:changed event.
2020-05-19 11:28:38 +01:00
Nick O'Leary f87698438d
[outliner] Handle switching projects properly 2020-05-07 21:48:47 +01:00
Nick O'Leary 2af7066512
Merge branch 'dev' into outliner 2020-05-05 15:11:35 +01:00
Nick O'Leary d7df20413d
Merge branch 'master' into dev 2020-05-04 11:41:44 +01:00
Nick O'Leary 2069cc4392
Add flows:reorder event 2020-04-27 10:49:54 +01:00
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
Nick O'Leary 2f869a55e2
Handle nodes with no wires array 2020-04-06 15:39:48 +01:00
Nick O'Leary 04da13eaf9
Merge branch 'pr_2523' into dev 2020-03-31 15:59:31 +01:00
Nick O'Leary 7fa4df082e
Force sync redraw of view when replacing unknown nodes 2020-03-31 15:58:51 +01:00
Nick O'Leary ae001c5e82
Merge branch 'master' into dev 2020-03-31 15:35:46 +01:00
Nick O'Leary e7f942eda7
Update nodeTabMap when replacing unknown nodes 2020-03-31 15:34:48 +01:00
Hiroyasu Nishiyama 08ec04c889 merge upstream/dev 2020-03-31 19:05:22 +09:00
Hiroyasu Nishiyama e5150ea012 force redraw after node installation 2020-03-31 16:48:20 +09:00
Nick O'Leary e0bef941b4
[groups] Include groups when copying whole tabs 2020-03-26 20:26:58 +00:00
Nick O'Leary 03e9522d98
[groups] Include groups when exporting 2020-03-26 18:01:57 +00:00
Nick O'Leary 1bdbd31b96
[groups] Overhaul group drag handling for empty groups 2020-03-26 15:27:34 +00:00
Nick O'Leary 7bc3b662e4
[groups] Fix up various delete/undo actions with groups 2020-03-24 14:05:09 +00:00
Nick O'Leary 9b2e9ec41a
[groups] Support undo of convert to subflow from inside group 2020-03-16 22:51:54 +00:00
Nick O'Leary 1bf3b3077e
[groups] Include groups when converting selection to subflow 2020-03-14 00:17:16 +00:00
Nick O'Leary 7886e5d57c
[groups] Add undo support for group actions 2020-03-13 23:01:01 +00:00
Nick O'Leary 0ef3471f8f
[groups] Add undo of group import 2020-03-13 11:27:13 +00:00
Nick O'Leary d1dd7d1d51
[groups] Support copy/paste/import/export of groups 2020-03-09 11:14:18 +00:00
Nick O'Leary 9a0c843f29
[groups] Support deleting groups as part of selection 2020-03-05 22:49:31 +00:00
Nick O'Leary 51ea5dc342
[groups] Add ungroup-selection action 2020-03-05 10:43:28 +00:00
Nick O'Leary 86ce5c591b
[groups] add basic group functionality to editor 2020-03-03 20:55:01 +00:00
Nick O'Leary cc177533e8
Dont export subflow template creds by default 2020-02-10 11:28:56 +00:00
Nick O'Leary cd210d9fbf
Add support for credential-stored env var in subflow 2020-02-10 11:28:56 +00:00
Kazuhito Yokoi faf6fa9450 Fix copy and paste handling in subflow 2019-10-16 20:59:01 +09:00
Nick O'Leary e5738d608c
Add fallback for Object.values call in IE11 2019-09-30 10:58:03 +01:00
Nick O'Leary 6fc9c03d70
Ensure complete node scope property is remapped on import 2019-09-24 21:04:33 +01:00
Nick O'Leary 6fb6b13037
Normalise default subflow color references 2019-09-23 10:28:26 +01:00
Nick O'Leary 607bc42f59
Merge branch 'dev' into pr_2225 2019-08-12 15:05:12 +01:00
Nick O'Leary 880757fb5d
Rework Subflow Instance property UI (#2236)
* Add support of Subflow UI definition

* new UI definition for env var

* fix label

* fixed value obtaining

* fixed label width

* fix checkbox

* fix subflow info

* remove old subflow ui tests

* add tests

* merge ui new changes

* fix initial open button

* fix environment variable edit tab

* WIP: cp-1

* Rework subflow ui property

* Restrict SF value type according to input selection

* Move subflow property UI code to subflow.js

* Update subflow ui type select appearance

* Present subflow instance properties as table rather than generated UI

* Move subflow instance properties to separate tab

* Fix subflow property ui element layout issues
2019-08-12 15:01:54 +01:00
Nick O'Leary 238de59a2a
Merge pull request #2232 from node-red-hitachi/fix-delete-tab
fix reference error on deleting tab
2019-07-30 23:04:01 +01:00
Hiroyasu Nishiyama cbce9b8637 fix undo handling & typo 2019-07-30 11:07:55 +09:00
Hiroyasu Nishiyama 86928bbb2d fix converting selection to subflow 2019-07-26 23:06:56 +09:00