File tree Expand file tree Collapse file tree 3 files changed +25
-4
lines changed
android/src/main/java/com/mjstudio/reactnativenavermap/mapview Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import android.annotation.SuppressLint
4
4
import android.os.Bundle
5
5
import android.view.Choreographer
6
6
import android.view.Choreographer.FrameCallback
7
+ import android.view.MotionEvent
7
8
import android.view.View
8
9
import android.widget.FrameLayout
9
10
import com.facebook.react.bridge.LifecycleEventListener
@@ -95,6 +96,26 @@ class RNCNaverMapViewWrapper(
95
96
96
97
override fun onHostDestroy () {}
97
98
99
+ override fun dispatchTouchEvent (ev : MotionEvent ? ): Boolean {
100
+ mapView?.withMap { map ->
101
+ if (map.uiSettings.isScrollGesturesEnabled) {
102
+ when (ev?.action) {
103
+ MotionEvent .ACTION_DOWN ,
104
+ MotionEvent .ACTION_MOVE ,
105
+ -> {
106
+ parent?.requestDisallowInterceptTouchEvent(true )
107
+ }
108
+ MotionEvent .ACTION_UP ,
109
+ MotionEvent .ACTION_CANCEL ,
110
+ -> {
111
+ parent?.requestDisallowInterceptTouchEvent(false )
112
+ }
113
+ }
114
+ }
115
+ }
116
+ return super .dispatchTouchEvent(ev)
117
+ }
118
+
98
119
companion object {
99
120
/* *
100
121
* A helper to get react tag id by given MapView
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @mj-studio/react-native-naver-map" ,
3
- "version" : " 2.5.2 " ,
3
+ "version" : " 2.5.3 " ,
4
4
"description" : " Naver Map Component for React Native" ,
5
5
"main" : " lib/commonjs/index" ,
6
6
"module" : " lib/module/index" ,
Original file line number Diff line number Diff line change @@ -138,9 +138,9 @@ interface Props extends ViewProps {
138
138
minZoom ?: Double ;
139
139
maxZoom ?: Double ;
140
140
141
- isShowCompass ?: boolean ;
142
- isShowScaleBar ?: boolean ;
143
- isShowZoomControls ?: boolean ;
141
+ isShowCompass ?: WithDefault < boolean , true > ;
142
+ isShowScaleBar ?: WithDefault < boolean , true > ;
143
+ isShowZoomControls ?: WithDefault < boolean , true > ;
144
144
isShowIndoorLevelPicker ?: boolean ;
145
145
isShowLocationButton ?: boolean ;
146
146
You can’t perform that action at this time.
0 commit comments