Skip to content

Commit

Permalink
Merge pull request #106 from tumblr/stories/scale-to-fill-rendering
Browse files Browse the repository at this point in the history
Stories: Scale to fill rendering + post-export overlays bug fixes
  • Loading branch information
bjtitus authored Mar 17, 2021
2 parents 9c73232 + 488fe1f commit f53e7f9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Classes/Editor/EditorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,11 @@ private struct EditorViewConstants {
final class EditorView: UIView, MovableViewCanvasDelegate, MediaPlayerViewDelegate {

func didRenderRectChange(rect: CGRect) {
drawingCanvasConstraints.update(with: rect)
movableViewCanvasConstraints.update(with: rect)
if playerView?.contentMode != .scaleToFill {
// When scaling to fill we don't need to update these views as they are already sized correctly.
drawingCanvasConstraints.update(with: rect)
movableViewCanvasConstraints.update(with: rect)
}
delegate?.didRenderRectChange(rect: rect)
}

Expand Down
3 changes: 3 additions & 0 deletions Classes/Editor/MultiEditor/MultiEditorViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,9 @@ extension MultiEditorViewController: EditorControllerDelegate {
editor.export { [weak self, editor] result in
let _ = editor // strong reference until the export completes
self?.exportHandler.handleExport(result, for: idx)
if let selected = self?.selected {
self?.loadEditor(for: selected)
}
}
}
})
Expand Down
2 changes: 1 addition & 1 deletion Kanvas.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "Kanvas"
spec.version = "1.2.4"
spec.version = "1.2.5"
spec.summary = "A custom camera built for iOS."
spec.homepage = "https://github.com/tumblr/kanvas-ios"
spec.license = "MPLv2"
Expand Down

0 comments on commit f53e7f9

Please sign in to comment.