Przeglądaj źródła

fix(iOS): image display error

leizhe 4 lat temu
rodzic
commit
f141d3e606

+ 2 - 4
src/main/frontend/components/block.cljs

@@ -262,10 +262,8 @@
     (when (or granted? (util/electron?) (mobile/is-native-platform?))
       (p/then (editor-handler/make-asset-url href) #(reset! src %)))
 
-    (if (mobile-util/native-ios?)
-      [:span full_text]
-      (when @src
-        (resizable-image config title @src metadata full_text true)))))
+    (when @src
+      (resizable-image config title @src metadata full_text true))))
 
 (defn ar-url->http-url
   [href]

+ 7 - 8
src/main/frontend/components/editor.cljs

@@ -331,14 +331,13 @@
                            (.focus input)))}
        (ui/icon "tag"
                 {:style {:fontSize ui/icon-size}})]]
-     (when-not (mobile-util/native-ios?)
-      [:div
-       [:button.bottom-action
-        {:on-mouse-down (fn [e]
-                          (util/stop e)
-                          (mobile-camera/embed-photo parent-id))}
-        (ui/icon "camera"
-                 {:style {:fontSize ui/icon-size}})]])
+     [:div
+      [:button.bottom-action
+       {:on-mouse-down (fn [e]
+                         (util/stop e)
+                         (mobile-camera/embed-photo parent-id))}
+       (ui/icon "camera"
+                {:style {:fontSize ui/icon-size}})]]
      [:div
       [:button.bottom-action
        {:on-mouse-down (fn [e]

+ 4 - 2
src/main/frontend/handler/image.cljs

@@ -7,11 +7,13 @@
             [frontend.state :as state]
             [frontend.util :as util]
             [goog.dom :as gdom]
-            [goog.object :as gobj]))
+            [goog.object :as gobj]
+            [frontend.mobile.util :as mobile-util]))
 
 (defn render-local-images!
   []
-  (when-not (and (util/electron?)
+  (when-not (and (or (util/electron?)
+                     (mobile-util/native-ios?))
                  (config/local-db? (state/get-current-repo)))
     (try
       (let [images (array-seq (gdom/getElementsByTagName "img"))