Skip to content

Commit

Permalink
Merge pull request #184 from DecwLK/marquee-fixes
Browse files Browse the repository at this point in the history
marquee tool fix
  • Loading branch information
crissNb authored Mar 10, 2024
2 parents 14d2816 + 9c316a8 commit b05b3a2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/main/java/org/gecko/view/views/EditorView.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@

/**
* Represents a displayable view in the Gecko Graphic Editor, holding a collection of displayed {@link ViewElement}s and
* other items specific to their vizualization.
* other items specific to their visualisation.
*/
public class EditorView {
private static final double AUTOMATON_INSPECTOR_HEIGHT = 680;

private final ViewFactory viewFactory;
@Getter
private final EditorViewModel viewModel;
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/gecko/viewmodel/EdgeViewModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public EdgeViewModel(
this.endOffsetProperty = new SimpleObjectProperty<>(Point2D.ZERO);
this.startPointProperty = new SimpleObjectProperty<>();
this.endPointProperty = new SimpleObjectProperty<>();
sizeProperty.setValue(Point2D.ZERO);
setBindings();

getSource().getOutgoingEdges().add(this);
Expand Down Expand Up @@ -194,12 +195,10 @@ public void setOrientation(int orientation) {

@Override
public void setPosition(@NonNull Point2D position) {
return;
}

@Override
public void setSize(@NonNull Point2D position) {
return;
}

@Override
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/gecko/viewmodel/EditorViewModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ public List<PositionableViewModelElement<?>> getElementsByName(String name) {
*/
public Set<PositionableViewModelElement<?>> getElementsInArea(Bounds bound) {
return containedPositionableViewModelElementsProperty.stream().filter(element -> {
if (element.getSize().equals(Point2D.ZERO)) {
return false;
}
Bounds elementBound =
new BoundingBox(element.getPosition().getX(), element.getPosition().getY(), element.getSize().getX(),
element.getSize().getY());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class SystemConnectionViewModel extends PositionableViewModelElement<Syst
this.sourceProperty = new SimpleObjectProperty<>(source);
this.destinationProperty = new SimpleObjectProperty<>(destination);
this.edgePoints = FXCollections.observableArrayList();
sizeProperty.setValue(Point2D.ZERO);
}

public void setSource(@NonNull PortViewModel source) {
Expand Down Expand Up @@ -99,12 +100,10 @@ public static boolean isConnectingAllowed(

@Override
public void setPosition(@NonNull Point2D position) {
return;
}

@Override
public void setSize(@NonNull Point2D position) {
return;
}

@Override
Expand Down

0 comments on commit b05b3a2

Please sign in to comment.