-
Notifications
You must be signed in to change notification settings - Fork 12
add field config on location #3978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -88,7 +88,7 @@ export class MapRender extends GlimmerComponent<MapRenderSignature> { | |||||||||||
| margin: 0; | ||||||||||||
| width: 100%; | ||||||||||||
| height: 100%; | ||||||||||||
| min-height: 300px; | ||||||||||||
| aspect-ratio: 16/9; | ||||||||||||
| position: relative; | ||||||||||||
| display: flex; | ||||||||||||
| align-items: center; | ||||||||||||
|
|
@@ -198,7 +198,9 @@ class LeafletLayerState implements LeafletLayerStateInterface { | |||||||||||
| const color = | ||||||||||||
| i === 0 ? '#22c55e' : i === coords.length - 1 ? '#ef4444' : '#3b82f6'; | ||||||||||||
| const marker = createMarker(c, color); | ||||||||||||
| if (c.address) marker.bindPopup(c.address); | ||||||||||||
| const popupContent = | ||||||||||||
| c.address?.trim() || `${c.lat.toFixed(6)}, ${c.lng.toFixed(6)}`; | ||||||||||||
|
Comment on lines
+201
to
+202
|
||||||||||||
| const popupContent = | |
| c.address?.trim() || `${c.lat.toFixed(6)}, ${c.lng.toFixed(6)}`; | |
| const trimmedAddress = c.address?.trim() || undefined; | |
| const popupContent = | |
| trimmedAddress ?? `${c.lat.toFixed(6)}, ${c.lng.toFixed(6)}`; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| { | ||
| "data": { | ||
| "meta": { | ||
| "adoptsFrom": { | ||
| "name": "GeoPointFieldSpec", | ||
| "module": "../geo-point-spec" | ||
| } | ||
| }, | ||
| "type": "card", | ||
| "attributes": { | ||
| "ref": { | ||
| "name": "default", | ||
| "module": "../../fields/geo-point" | ||
| }, | ||
| "basic": { | ||
| "lat": 35.713552518550046, | ||
| "lon": 139.78250909596682 | ||
| }, | ||
| "readMe": null, | ||
| "cardInfo": { | ||
| "name": null, | ||
| "notes": null, | ||
| "summary": null, | ||
| "cardThumbnailURL": null | ||
| }, | ||
| "combined": { | ||
| "lat": 3.1686073220230058, | ||
| "lon": 101.53343932757683 | ||
| }, | ||
| "specType": "field", | ||
| "cardTitle": "Geo Point Field", | ||
| "mapPicker": { | ||
| "lat": 40.75080629178881, | ||
| "lon": -74.03073135763408 | ||
| }, | ||
| "cardDescription": "Configurable GeoPointField spec used by the playground.", | ||
| "containedExamples": [], | ||
| "withQuickLocations": { | ||
| "lat": 48.8534951, | ||
| "lon": 2.3483915 | ||
| }, | ||
| "mapPickerWithAddons": { | ||
| "lat": 40.7127281, | ||
| "lon": -74.0060152 | ||
| }, | ||
| "withCurrentLocation": { | ||
| "lat": 3.1685946003187757, | ||
| "lon": 101.53342388429286 | ||
| }, | ||
| "mapPickerWithQuickLocations": { | ||
| "lat": 48.8534951, | ||
| "lon": 2.3483915 | ||
| }, | ||
| "mapPickerWithCurrentLocation": { | ||
| "lat": 3.168046434513096, | ||
| "lon": 101.53263743966819 | ||
| } | ||
| }, | ||
| "relationships": { | ||
| "cardInfo.theme": { | ||
| "links": { | ||
| "self": null | ||
| } | ||
| }, | ||
| "linkedExamples": { | ||
| "links": { | ||
| "self": null | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| { | ||
| "data": { | ||
| "meta": { | ||
| "adoptsFrom": { | ||
| "name": "GeoSearchPointFieldSpec", | ||
| "module": "../geo-search-point-spec" | ||
| } | ||
| }, | ||
| "type": "card", | ||
| "attributes": { | ||
| "ref": { | ||
| "name": "default", | ||
| "module": "../../fields/geo-search-point" | ||
| }, | ||
| "basic": { | ||
| "lat": 3.1336269, | ||
| "lon": 101.6299203, | ||
| "searchKey": "Glo damansara" | ||
| }, | ||
| "readMe": null, | ||
| "cardInfo": { | ||
| "name": null, | ||
| "notes": null, | ||
| "summary": null, | ||
| "cardThumbnailURL": null | ||
| }, | ||
| "combined": { | ||
| "lat": 3.1516964, | ||
| "lon": 101.6942371, | ||
| "searchKey": "Kuala Lumpur, 50100, Malaysia" | ||
| }, | ||
| "specType": "field", | ||
| "cardTitle": "Geo Search Point Field", | ||
| "withTopResults": { | ||
| "lat": 3.1414907, | ||
| "lon": 101.7182597, | ||
| "searchKey": "Tun Razak Exchange (TRX), Pudu, Kuala Lumpur, 55188, Malaysia" | ||
| }, | ||
| "cardDescription": "Spec card that renders GeoSearchPointField examples.", | ||
| "containedExamples": [], | ||
| "withoutRecentSearches": { | ||
| "lat": 48.8534951, | ||
| "lon": 2.3483915, | ||
| "searchKey": "Paris, Ile-de-France, Metropolitan France, France" | ||
| } | ||
| }, | ||
| "relationships": { | ||
| "cardInfo.theme": { | ||
| "links": { | ||
| "self": null | ||
| } | ||
| }, | ||
| "linkedExamples": { | ||
| "links": { | ||
| "self": null | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting both
height: 100%andaspect-ratio: 16/9on the same element can lead to conflicting layout behavior. If the parent container has a defined height,height: 100%will take precedence and the aspect-ratio will be ignored. If the parent doesn't have a defined height, the aspect-ratio will control the height based on width. This could lead to inconsistent sizing behavior depending on the parent container. Consider removing one of these properties or documenting the intended layout behavior more clearly.