Prevent pointer events from propagating

Fix map alignment
This commit is contained in:
angusiguess 2017-10-10 11:49:07 -03:00 committed by Roman Volosovskyi
parent 98beef138f
commit 833072087f
2 changed files with 7 additions and 6 deletions

View File

@ -62,7 +62,7 @@
:border-color "rgba(255, 255, 255, 0.3)"})
(def qr-container
{:flex 1})
{:flex 1})
(def preview
{:flex 1

View File

@ -81,11 +81,12 @@
[react/view {:style styles/wallet-container}
[status-bar/status-bar {:type :wallet}]
[toolbar-view camera-flashlight]
[react/view {:style styles/qr-container
:on-layout #(let [layout (.. % -nativeEvent -layout)]
(re-frame/dispatch [:set-in [:wallet/send-transaction :camera-dimensions]
{:width (.-width layout)
:height (.-height layout)}]))}
[react/view {:style styles/qr-container
:pointerEvents :none
:on-layout #(let [layout (.. % -nativeEvent -layout)]
(re-frame/dispatch [:set-in [:wallet/send-transaction :camera-dimensions]
{:width (.-width layout)
:height (.-height layout)}]))}
(when (or platform/android?
camera-permitted?)
[camera/camera {:style styles/preview