NIFI-12237 change label height and width from POSITION to SIZE difference (#7889)

This commit is contained in:
Michael Moser 2023-10-18 12:56:19 -04:00 committed by GitHub
parent 91e4b453b4
commit 229199dab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View File

@ -65,6 +65,9 @@ public class ConciseEvolvingDifferenceDescriptor implements DifferenceDescriptor
case POSITION_CHANGED:
description = "Position was changed";
break;
case SIZE_CHANGED:
description = "Size was changed";
break;
case BENDPOINTS_CHANGED:
description = "Connection Bendpoints changed";
break;

View File

@ -220,6 +220,11 @@ public enum DifferenceType {
*/
POSITION_CHANGED("Position Changed"),
/**
* The height and/or width size of the component is different in each of the flows
*/
SIZE_CHANGED("Size Changed"),
/**
* The stylistic configuration of the component is different in each of the flows
*/

View File

@ -456,8 +456,8 @@ public class StandardFlowComparator implements FlowComparator {
}
addIfDifferent(differences, DifferenceType.LABEL_VALUE_CHANGED, labelA, labelB, VersionedLabel::getLabel);
addIfDifferent(differences, DifferenceType.POSITION_CHANGED, labelA, labelB, VersionedLabel::getHeight);
addIfDifferent(differences, DifferenceType.POSITION_CHANGED, labelA, labelB, VersionedLabel::getWidth);
addIfDifferent(differences, DifferenceType.SIZE_CHANGED, labelA, labelB, VersionedLabel::getHeight);
addIfDifferent(differences, DifferenceType.SIZE_CHANGED, labelA, labelB, VersionedLabel::getWidth);
addIfDifferent(differences, DifferenceType.STYLE_CHANGED, labelA, labelB, VersionedLabel::getStyle);
addIfDifferent(differences, DifferenceType.ZINDEX_CHANGED, labelA, labelB, VersionedLabel::getzIndex);
}