Skip to content

Commit

Permalink
fix collapse
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloalba committed Jul 9, 2024
1 parent 97da53c commit 31fa95f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions editor/css/trotamundos.css
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ a:visited {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
cursor: pointer;
}

Expand Down
Binary file modified editor/icons/collapse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified editor/icons/expand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions editor/js/trotamundos.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@ function reloadSection(data) {
loadImageFromDB(data.imageId, photo.id);
} else if ('subtitle' == data.type) {
img.src = 'icons/title.png';

section.dataset.sectionId = data.id;
section.addEventListener('click', toggleSubtitleEv, true);

text = document.createElement('div');
text.classList.add('container');
text.classList.add('text-container');
Expand All @@ -479,11 +483,7 @@ function reloadSection(data) {
} else {
expand.src = 'icons/collapse.png';
}

expand.classList.add('icon');
expand.dataset.sectionId = data.id;
expand.addEventListener('click', toggleSubtitleEv, false);

//expand.classList.add('icon');
section.appendChild(img);
section.appendChild(text);
section.appendChild(expand);
Expand Down

0 comments on commit 31fa95f

Please sign in to comment.