Skip to content

Commit 4a319b5

Browse files
committed
Fix right margin for note's resizer
1 parent 3ff9220 commit 4a319b5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/com/github/nianna/karedi/display/NoteNode.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,8 @@ private void bindProperties() {
109109
private void updateNoteStyle(Type oldType, Type newType) {
110110
noteDisplayer.updateType(oldType, newType);
111111
Bounds barBounds = noteDisplayer.getBar().getBoundsInParent();
112-
double leftMargin = BASIC_RESIZE_MARGIN + Math.abs(barBounds.getMinX());
113-
double rightMargin = BASIC_RESIZE_MARGIN
114-
+ Math.abs(barBounds.getMaxX() - noteDisplayer.getWidth());
115-
resizer.setMargins(new Insets(0, leftMargin, 0, rightMargin));
112+
double horizontalMargin = BASIC_RESIZE_MARGIN + Math.abs(barBounds.getMinX());
113+
resizer.setMargins(new Insets(0, horizontalMargin, 0, horizontalMargin));
116114
}
117115

118116
private void onMouseClicked(MouseEvent event) {

0 commit comments

Comments
 (0)