Skip to content

Commit

Permalink
- Fixed right-left choose limit
Browse files Browse the repository at this point in the history
  • Loading branch information
BAHATTIN KOC committed Jun 7, 2024
1 parent ea100ad commit de4c6e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GameGuessr/DraggableRectangleView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ struct DraggableRectangleView: View {
ChooseView(direction: .right,
title: options[1].name ?? "",
color: .green,
offset: CGSize(width: min(offset.width * 0.5 + 160, geometry.size.width / 2.3), height: 0),
offset: CGSize(width: min(offset.width * 0.5 + 160, geometry.size.width / 2.3 - 30.0), height: 0),
hasVibrated: hasVibrated && dragDirection != nil,
rotationAngle: rotationAngle,
visibility: dragDirection == .right || !isDragging || (isDragging && dragDirection == nil))

ChooseView(direction: .left,
title: options[2].name ?? "",
color: .red,
offset: CGSize(width: max(offset.width * 0.5 - 160, -(geometry.size.width / 2.3)), height: 0),
offset: CGSize(width: max(offset.width * 0.5 - 160, -(geometry.size.width / 2.3) + 30.0), height: 0),
hasVibrated: hasVibrated && dragDirection != nil,
rotationAngle: rotationAngle,
visibility: dragDirection == .left || !isDragging || (isDragging && dragDirection == nil))
Expand Down

0 comments on commit de4c6e8

Please sign in to comment.