@maplibre/maplibre-react-native 11.1.0 → 11.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,6 @@ import android.view.ViewGroup
|
|
|
8
8
|
import android.widget.FrameLayout
|
|
9
9
|
import com.facebook.react.bridge.ReactContext
|
|
10
10
|
import com.facebook.react.uimanager.UIManagerHelper
|
|
11
|
-
import com.facebook.react.uimanager.ViewGroupManager
|
|
12
11
|
import org.maplibre.android.geometry.LatLng
|
|
13
12
|
import org.maplibre.geojson.Point
|
|
14
13
|
import org.maplibre.reactnative.components.AbstractMapFeature
|
|
@@ -32,7 +31,7 @@ class MLRNMarkerView(
|
|
|
32
31
|
private var mAddedToMap = false
|
|
33
32
|
private var mLastWidth = 0
|
|
34
33
|
private var mLastHeight = 0
|
|
35
|
-
private var mLastZIndex:
|
|
34
|
+
private var mLastZIndex: Float? = null
|
|
36
35
|
private var markerId: String? = null
|
|
37
36
|
|
|
38
37
|
private val surfaceId: Int
|
|
@@ -117,6 +116,7 @@ class MLRNMarkerView(
|
|
|
117
116
|
}
|
|
118
117
|
|
|
119
118
|
fun updateZIndex(zIndex: Float) {
|
|
119
|
+
mLastZIndex = zIndex
|
|
120
120
|
mWrapperView?.translationZ = zIndex
|
|
121
121
|
}
|
|
122
122
|
|
|
@@ -174,9 +174,8 @@ class MLRNMarkerView(
|
|
|
174
174
|
}
|
|
175
175
|
mWrapperView!!.setLayerType(LAYER_TYPE_HARDWARE, null)
|
|
176
176
|
|
|
177
|
-
mLastZIndex
|
|
178
|
-
|
|
179
|
-
mWrapperView!!.translationZ = mLastZIndex!!.toFloat()
|
|
177
|
+
mLastZIndex?.let { zIndex ->
|
|
178
|
+
mWrapperView!!.translationZ = zIndex
|
|
180
179
|
}
|
|
181
180
|
|
|
182
181
|
val scale = resources.displayMetrics.density
|
|
@@ -233,14 +232,6 @@ class MLRNMarkerView(
|
|
|
233
232
|
return
|
|
234
233
|
}
|
|
235
234
|
|
|
236
|
-
val currentZIndex = ViewGroupManager.getViewZIndex(this@MLRNMarkerView)
|
|
237
|
-
if (currentZIndex != mLastZIndex) {
|
|
238
|
-
mLastZIndex = currentZIndex
|
|
239
|
-
if (currentZIndex != null) {
|
|
240
|
-
mWrapperView?.translationZ = currentZIndex.toFloat()
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
235
|
if (width == mLastWidth && height == mLastHeight) return
|
|
245
236
|
|
|
246
237
|
mLastWidth = width
|
package/package.json
CHANGED