Skip to content
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

Merge entry style into location style for geometry entry. #1323

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/ui/locations/entries/geometry.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ export default function geometry(entry) {
// Return if entry has no geometry value and cannot be drawn in to.
if (!entry.value && !entry.draw && !entry.api) return;

// Assign [OL] Style if not already assigned.
entry.Style ??= typeof entry.style === 'object' ?
mapp.utils.style(entry.style) : entry.location.Style
// Assign entry.style to location.style
entry.style = { ...entry.location?.style, ...entry.style }

// Create ol style from entry.style if not yet defined.
entry.Style ??= mapp.utils.style(entry.style)

// Assign method to show geometry in mapview.
entry.show ??= show
Expand Down
Loading