Skip to content

Commit

Permalink
fix: fix RotationDial reset issue
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyingtao committed Mar 1, 2023
1 parent 6b6026e commit 82cc00e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/Mantis/RotationDial/RotationDial.swift
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ extension RotationDial: RotationDialProtocol {
}

func reset() {
transform = .identity
dialPlate?.reset()
dialConfig.rotationCenterType = .useDefault
}
}
4 changes: 4 additions & 0 deletions Sources/Mantis/RotationDial/RotationDialPlate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,8 @@ class RotationDialPlate: UIView {
setupAngleNumber()
setCenterPart()
}

func reset() {
transform = .identity
}
}

0 comments on commit 82cc00e

Please sign in to comment.