Skip to content

Commit

Permalink
Fix right margin for note's resizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Nianna committed Sep 17, 2017
1 parent 3ff9220 commit 4a319b5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/java/com/github/nianna/karedi/display/NoteNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,8 @@ private void bindProperties() {
private void updateNoteStyle(Type oldType, Type newType) {
noteDisplayer.updateType(oldType, newType);
Bounds barBounds = noteDisplayer.getBar().getBoundsInParent();
double leftMargin = BASIC_RESIZE_MARGIN + Math.abs(barBounds.getMinX());
double rightMargin = BASIC_RESIZE_MARGIN
+ Math.abs(barBounds.getMaxX() - noteDisplayer.getWidth());
resizer.setMargins(new Insets(0, leftMargin, 0, rightMargin));
double horizontalMargin = BASIC_RESIZE_MARGIN + Math.abs(barBounds.getMinX());
resizer.setMargins(new Insets(0, horizontalMargin, 0, horizontalMargin));
}

private void onMouseClicked(MouseEvent event) {
Expand Down

0 comments on commit 4a319b5

Please sign in to comment.