Skip to content

Commit

Permalink
refactor: Improve popup styling and functionality in MapView.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
manuGil committed Jul 3, 2024
1 parent 0be95f4 commit b8a1128
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion frontend/components/MapView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -291,13 +291,25 @@ const onMapWWControlReady = () => {
}
// popup
const popupContent = document.createElement('div');
popupContent.style.width = '200px'; // Set the width of the popup
const input = document.createElement('input');
input.type = 'text';
input.id = 'feature-description';
input.placeholder = 'Type description';
input.placeholder = 'Type a description';
input.style.width = '100%'; // Make input take the full width of its parent
input.style.padding = '5px 5px';
input.style.borderRadius = '3px';
input.style.overflowWrap = 'break-word'; // Break long words to prevent overflow
// input.style.width = '100%';
const saveButton = document.createElement('button');
saveButton.textContent = 'Save';
saveButton.style.backgroundColor = '#FF4C50';
saveButton.style.color = 'white';
saveButton.style.padding = '4px 8px';
saveButton.style.borderRadius = '5px';
saveButton.style.marginTop = '10px';
saveButton.onclick = () => {
console.log('layer value //> ', input.value)
handleSaveDescription(input.value);
Expand Down

0 comments on commit b8a1128

Please sign in to comment.