refactor(handle-handling): cleanup

This commit is contained in:
moklick
2020-10-29 12:36:10 +01:00
parent 15d0900ba9
commit ddd3baa5f7
10 changed files with 78 additions and 63 deletions
+2 -2
View File
@@ -15,8 +15,8 @@ export default memo(({ data }) => {
Custom Color Picker Node: <strong>{data.color}</strong>
</div>
<input className="nodrag" type="color" onChange={data.onChange} defaultValue={data.color} />
<Handle type="source" position="right" id="0" style={{ top: 10, background: '#555' }} />
<Handle type="source" position="right" id="1" style={{ bottom: 10, top: 'auto', background: '#555' }} />
<Handle type="source" position="right" id="a" style={{ top: 10, background: '#555' }} />
<Handle type="source" position="right" id="b" style={{ bottom: 10, top: 'auto', background: '#555' }} />
</>
);
});
+2 -2
View File
@@ -56,8 +56,8 @@ const CustomNodeFlow = () => {
{ id: '4', type: 'output', data: { label: 'Output B' }, position: { x: 550, y: 100 }, targetPosition: 'left' },
{ id: 'e1-2', source: '1', target: '2', animated: true, style: { stroke: '#fff' } },
{ id: 'e2a-3', source: '2', sourceHandle: '0', target: '3', animated: true, style: { stroke: '#fff' } },
{ id: 'e2b-4', source: '2', sourceHandle: '1', target: '4', animated: true, style: { stroke: '#fff' } },
{ id: 'e2a-3', source: '2', sourceHandle: 'a', target: '3', animated: true, style: { stroke: '#fff' } },
{ id: 'e2b-4', source: '2', sourceHandle: 'b', target: '4', animated: true, style: { stroke: '#fff' } },
]);
}, []);