瀏覽代碼

https://github.com/nextcloud-gmbh/h1/issues/107

marinofaggiana 3 年之前
父節點
當前提交
d1d54e69f2
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      iOSClient/Viewer/NCViewerImage/NCViewerImage.swift

+ 1 - 2
iOSClient/Viewer/NCViewerImage/NCViewerImage.swift

@@ -373,8 +373,7 @@ class NCViewerImage: UIViewController {
                 image = UIImage.animatedImage(withAnimatedGIFURL: URL(fileURLWithPath: imagePath))
             } else if ext == "SVG" {
                 if let svgImage = SVGKImage(contentsOfFile: imagePath) {
-                    let scale = Int(svgImage.size.height / svgImage.size.width)
-                    svgImage.size = CGSize(width: NCGlobal.shared.sizePreview, height: (NCGlobal.shared.sizePreview * scale))
+                    svgImage.size = CGSize(width: NCGlobal.shared.sizePreview, height: NCGlobal.shared.sizePreview)
                     if let image = svgImage.uiImage {
                         if !FileManager().fileExists(atPath: previewPath) {
                             do {