Skip to content

Commit

Permalink
Support React Native 0.75
Browse files Browse the repository at this point in the history
  • Loading branch information
mym0404 committed Oct 2, 2024
1 parent 22045f0 commit 5cfecb3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ class RNCNaverMapViewManager : RNCNaverMapViewManagerSpec<RNCNaverMapViewWrapper
override fun needsCustomLayoutForChildren(): Boolean = true

override fun addView(
parent: RNCNaverMapViewWrapper?,
parent: RNCNaverMapViewWrapper,
child: View,
index: Int,
) {
parent?.withMapView {
parent.withMapView {
it.addOverlay(child, index)
}
}
Expand All @@ -144,17 +144,15 @@ class RNCNaverMapViewManager : RNCNaverMapViewManagerSpec<RNCNaverMapViewWrapper
}

override fun getChildAt(
parent: RNCNaverMapViewWrapper?,
parent: RNCNaverMapViewWrapper,
index: Int,
): View? {
return parent?.mapView?.overlays?.get(index)
}
): View? = parent.mapView?.overlays?.get(index)

override fun removeViewAt(
parent: RNCNaverMapViewWrapper?,
parent: RNCNaverMapViewWrapper,
index: Int,
) {
parent?.withMapView {
parent.withMapView {
it.removeOverlay(index)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ class RNCNaverMapMarkerManager : RNCNaverMapMarkerManagerSpec<RNCNaverMapMarker>
}

override fun addView(
parent: RNCNaverMapMarker?,
parent: RNCNaverMapMarker,
child: View,
index: Int,
) {
parent?.setCustomView(child, index)
parent.setCustomView(child, index)
}

override fun removeViewAt(
parent: RNCNaverMapMarker?,
parent: RNCNaverMapMarker,
index: Int,
) {
parent?.removeCustomView(index)
parent.removeCustomView(index)
}

@ReactProp(name = "coord")
Expand Down

0 comments on commit 5cfecb3

Please sign in to comment.