Skip to content

Commit

Permalink
Left click
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinShalit committed Aug 10, 2016
1 parent 5b1e389 commit 59f59f8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ui/src/main/java/edu/wpi/grip/ui/pipeline/StepController.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import javafx.scene.control.Labeled;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
Expand Down Expand Up @@ -193,15 +194,15 @@ private void moveStepRight() {

/**
* Clicking the arrow at the top of the step will cause the step to either expand or retract.
* Double clicking the arrow at the top of the step will cause all steps to either expand or
* Secondary clicking the arrow at the top of the step will cause all steps to either expand or
* retract.
*/
@FXML
private void toggleExpand(MouseEvent event) {
if (event.getClickCount() == 1) {
if (event.getButton().equals(MouseButton.PRIMARY)) {
expanded.set(!expanded.get());
} else if (event.getClickCount() == 2) {
eventBus.post(new SetStepsExpandedEvent(expanded.get()));
} else if (event.getButton().equals(MouseButton.SECONDARY)) {
eventBus.post(new SetStepsExpandedEvent(!expanded.get()));
}
}

Expand Down

0 comments on commit 59f59f8

Please sign in to comment.