@@ -25,6 +25,7 @@ const lineColor = () => theme().connectionLineColor;
25
25
const seqLineColor = ( ) => theme ( ) . seqConnectionLineColor ;
26
26
const selectedLineColor = ( ) => theme ( ) . selectedConnectionLineColor ;
27
27
const selectedLineColorInViewer = ( ) => theme ( ) . selectionBackgroundColor ;
28
+ const disabledLineColor = ( ) => theme ( ) . disabledLineColor ;
28
29
29
30
export const strokeWidth = 1.2 ;
30
31
const seqStrokeWidth = 1.2 ;
@@ -221,61 +222,68 @@ const ConnectionLineDebugValue = observer(
221
222
}
222
223
) ;
223
224
224
- class VisiblePath extends React . Component < {
225
- lineShape : string ;
226
- selected : boolean ;
227
- connectionLine : ConnectionLine ;
228
- context : IFlowContext ;
229
- targetInput : ComponentInput | undefined ;
230
- shadow : { color : string } | undefined ;
231
- } > {
232
- ref = React . createRef < SVGPathElement > ( ) ;
233
-
234
- componentDidMount ( ) {
235
- if ( this . ref . current ) {
236
- registerPath ( this . props . connectionLine , this . ref . current ) ;
225
+ const VisiblePath = observer (
226
+ class VisiblePath extends React . Component < {
227
+ lineShape : string ;
228
+ selected : boolean ;
229
+ connectionLine : ConnectionLine ;
230
+ context : IFlowContext ;
231
+ targetInput : ComponentInput | undefined ;
232
+ shadow : { color : string } | undefined ;
233
+ } > {
234
+ ref = React . createRef < SVGPathElement > ( ) ;
235
+
236
+ componentDidMount ( ) {
237
+ if ( this . ref . current ) {
238
+ registerPath ( this . props . connectionLine , this . ref . current ) ;
239
+ }
237
240
}
238
- }
239
241
240
- componentWillUnmount ( ) {
241
- if ( this . ref . current ) {
242
- unregisterPath ( this . props . connectionLine , this . ref . current ) ;
242
+ componentWillUnmount ( ) {
243
+ if ( this . ref . current ) {
244
+ unregisterPath ( this . props . connectionLine , this . ref . current ) ;
245
+ }
243
246
}
244
- }
245
247
246
- render ( ) {
247
- const { lineShape, selected, connectionLine, targetInput } = this . props ;
248
+ render ( ) {
249
+ const { lineShape, selected, connectionLine, targetInput } =
250
+ this . props ;
248
251
249
- const seq =
250
- targetInput ?. isSequenceInput &&
251
- ! (
252
- connectionLine . targetComponent instanceof
253
- ProjectEditor . OutputActionComponentClass
254
- ) ;
252
+ const seq =
253
+ targetInput ?. isSequenceInput &&
254
+ ! (
255
+ connectionLine . targetComponent instanceof
256
+ ProjectEditor . OutputActionComponentClass
257
+ ) ;
255
258
256
- return (
257
- < path
258
- ref = { this . ref }
259
- d = { lineShape }
260
- style = { {
261
- fill : "none" ,
262
- strokeWidth : this . props . shadow
263
- ? 2
264
- : seq
265
- ? seqStrokeWidth
266
- : strokeWidth ,
267
- strokeLinecap : "round" ,
268
- stroke : this . props . shadow ?. color
269
- } }
270
- className = { classNames ( "connection-line-path" , {
271
- selected,
272
- seq
273
- } ) }
274
- vectorEffect = { selected ? "non-scaling-stroke" : "none" }
275
- > </ path >
276
- ) ;
259
+ return (
260
+ < path
261
+ ref = { this . ref }
262
+ d = { lineShape }
263
+ style = { {
264
+ fill : "none" ,
265
+ strokeWidth : this . props . shadow
266
+ ? 2
267
+ : seq
268
+ ? seqStrokeWidth
269
+ : strokeWidth ,
270
+ strokeLinecap : "round" ,
271
+ strokeDasharray : connectionLine . disabled
272
+ ? "5.5"
273
+ : undefined ,
274
+ stroke : this . props . shadow ?. color
275
+ } }
276
+ className = { classNames ( "connection-line-path" , {
277
+ selected,
278
+ disabled : connectionLine . disabled ,
279
+ seq
280
+ } ) }
281
+ vectorEffect = { selected ? "non-scaling-stroke" : "none" }
282
+ > </ path >
283
+ ) ;
284
+ }
277
285
}
278
- }
286
+ ) ;
279
287
280
288
const DebugValue = observer (
281
289
( {
@@ -351,6 +359,7 @@ export const LineMarkers = () => (
351
359
id = "selectedLineEndInViewer"
352
360
color = { selectedLineColorInViewer ( ) }
353
361
/>
362
+ < LineEndMarker id = "disabledLineEnd" color = { disabledLineColor ( ) } />
354
363
< AnimationCurveEndMarker />
355
364
< pattern
356
365
id = "page-background"
0 commit comments