Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

Commit

Permalink
Fixes the resizeScore() method
Browse files Browse the repository at this point in the history
  • Loading branch information
vapour101 committed Aug 23, 2017
1 parent c6d5753 commit cc2b90d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/main/java/ui/BoardController.java
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,19 @@ private void resizeScore(ObservableValue<? extends Number> observableValue, Numb
Separator separator = null;

for (Node node : scorePane.getChildren()) {
if ( node.getId().equals("blackScoreBox") )
blackScoreBox = (VBox) node;

if ( node.getId().equals("scoreSeparator") )
if ( node instanceof Separator )
separator = (Separator) node;
}

if ( blackScoreBox == null || separator == null )
if ( separator == null )
return;

for (Node node : scorePane.getChildren()) {
if ( node instanceof VBox && node.getLayoutX() < separator.getLayoutX() )
blackScoreBox = (VBox) node;
}

if ( blackScoreBox == null )
return;

double width = (scorePane.getWidth() - separator.getWidth()) / 2;
Expand Down

0 comments on commit cc2b90d

Please sign in to comment.