Skip to content

Commit

Permalink
Fix map animations on small width screens
Browse files Browse the repository at this point in the history
Fix overlay layer blocking map interaction
  • Loading branch information
dellisd committed Aug 8, 2023
1 parent 514cbfc commit 24e53d1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions web/src/jsMain/kotlin/ca/derekellis/reroute/map/MapView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import ca.derekellis.reroute.RerouteConfig
import ca.derekellis.reroute.ui.View
import ca.derekellis.reroute.utils.jsObject
import geojson.Feature
import kotlinx.browser.window
import me.tatarka.inject.annotations.Inject
import org.jetbrains.compose.web.css.height
import org.jetbrains.compose.web.css.hsl
Expand All @@ -37,7 +36,7 @@ class MapView : View<MapViewModel, MapViewEvent> {
mapState.flyTo(
center = LngLat(longitude, latitude),
zoom = 16.0,
padding = jsObject { right = window.innerWidth - window.innerHeight },
padding = jsObject { right = 512 },
)
} else {
mapState.padding = jsObject { right = 0 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import org.jetbrains.compose.web.css.borderRadius
import org.jetbrains.compose.web.css.boxSizing
import org.jetbrains.compose.web.css.cursor
import org.jetbrains.compose.web.css.display
import org.jetbrains.compose.web.css.em
import org.jetbrains.compose.web.css.flexDirection
import org.jetbrains.compose.web.css.height
import org.jetbrains.compose.web.css.hsl
Expand Down Expand Up @@ -70,7 +69,7 @@ class SearchView : View<SearchViewModel, SearchViewEvent> {
object SearchStyleSheet : StyleSheet() {
val searchContainer by style {
padding(16.px)
width(32.em)
width(512.px)
height(auto)
display(DisplayStyle.Flex)
flexDirection(FlexDirection.Column)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ object AppStylesheet : StyleSheet() {
left(0.px)
width(100.percent)
height(100.percent)
property("pointer-events", "none")
}

val SmallMediaQuery = mediaMaxWidth(600.px)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import org.jetbrains.compose.web.dom.Text

object InfoPanelStylesheet : StyleSheet() {
val infoPanelContainer by style {
width(32.em)
width(512.px)
height(100.percent)
background("#FFFFFF")
position(Position.Fixed)
Expand Down

0 comments on commit 24e53d1

Please sign in to comment.