mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-07-11 07:12:55 +02:00
feat: add zoom scale options
This commit is contained in:
@@ -162,6 +162,12 @@ extension CanvasViewController {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
canvas.zoomPublisher
|
||||
.sink { [weak self] zoomScale in
|
||||
self?.zoomChanged(zoomScale)
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
tool.$selectedPen
|
||||
.sink { [weak self] pen in
|
||||
self?.penChanged(to: pen)
|
||||
@@ -298,6 +304,12 @@ extension CanvasViewController {
|
||||
}
|
||||
}
|
||||
|
||||
extension CanvasViewController {
|
||||
func zoomChanged(_ zoomScale: CGFloat) {
|
||||
scrollView.setZoomScale(zoomScale, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
extension CanvasViewController {
|
||||
func historyUndid() {
|
||||
guard history.undo() else { return }
|
||||
|
||||
Reference in New Issue
Block a user