Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
scottyaslan committed May 8, 2024
1 parent b719064 commit ed6adb5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -497,11 +497,7 @@ export class ConnectionManager {
.attr('class', 'connection');

// create a connection between the two components
connection
.append('path')
.attr('class', 'connection-path')
.attr('filter', 'url(#connection-drop-shadow)')
.attr('pointer-events', 'none');
connection.append('path').attr('class', 'connection-path').attr('pointer-events', 'none');

// path to show when selection
connection.append('path').attr('class', 'connection-selection-path').attr('pointer-events', 'none');
Expand Down Expand Up @@ -1673,7 +1669,7 @@ export class ConnectionManager {
if (self.isFullCount(d) || self.isFullBytes(d)) {
return 'url(#connection-full-drop-shadow)';
} else {
return 'url(#connection-drop-shadow)';
return 'url(#component-drop-shadow)';
}
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,6 @@
/*
Connection
*/
#connection-drop-shadow feFlood {
flood-color: $connection-drop-shadow-color;
}

#connection-full-drop-shadow feFlood {
flood-color: $material-theme-warn-palette-darker;
}
Expand Down Expand Up @@ -301,6 +297,9 @@
g.connection path.connection-path {
fill: none;
stroke: $surface-contrast;
filter: drop-shadow(
0 3px 6px if($is-dark, $nifi-theme-surface-palette-darker, $nifi-theme-surface-palette-lighter)
);
}

g.connection path.connection-path.full {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,44 +381,6 @@ export class Canvas implements OnInit, OnDestroy {
componentDropShadowFeMerge.append('feMergeNode').attr('in', 'offsetColorBlur');
componentDropShadowFeMerge.append('feMergeNode').attr('in', 'SourceGraphic');

// filter for connection drop shadow
const connectionDropShadowFilter = defs
.append('filter')
.attr('id', 'connection-drop-shadow')
.attr('height', '140%')
.attr('y', '-20%');

// blur
connectionDropShadowFilter
.append('feGaussianBlur')
.attr('in', 'SourceAlpha')
.attr('stdDeviation', 3)
.attr('result', 'blur');

// offset
connectionDropShadowFilter
.append('feOffset')
.attr('in', 'blur')
.attr('dx', 0)
.attr('dy', 1)
.attr('result', 'offsetBlur');

// color/opacity
connectionDropShadowFilter.append('feFlood').attr('flood-opacity', 1).attr('result', 'offsetColor');

// combine
connectionDropShadowFilter
.append('feComposite')
.attr('in', 'offsetColor')
.attr('in2', 'offsetBlur')
.attr('operator', 'in')
.attr('result', 'offsetColorBlur');

// stack the effect under the source graph
const connectionDropShadowFeMerge = connectionDropShadowFilter.append('feMerge');
connectionDropShadowFeMerge.append('feMergeNode').attr('in', 'offsetColorBlur');
connectionDropShadowFeMerge.append('feMergeNode').attr('in', 'SourceGraphic');

// filter for drop shadow
const connectionFullDropShadowFilter = defs
.append('filter')
Expand Down

0 comments on commit ed6adb5

Please sign in to comment.