Skip to content

Commit

Permalink
remove contentUpdated listener
Browse files Browse the repository at this point in the history
  • Loading branch information
smellman committed Jul 25, 2024
1 parent 1fabfc4 commit fc4166e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions app/helpers/gtt_map_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,10 @@ def map_tag(map: nil, layers: map&.layers,
observer.observe(document.body, config);
}
if (!#{show}) {
document.addEventListener('contentUpdated', function(){
var target = document.getElementById('#{uid}');
target.classList.add('map-editable');
window.createGttClient(target);
contentObserver();
}, { once: true });
var target = document.getElementById('#{uid}');
if (
document.readyState === 'complete'
&& !target.hasChildNodes()
&& document.getElementsByClassName('map-editable').length === 1
) {
window.createGttClient(target);
}
Expand Down

0 comments on commit fc4166e

Please sign in to comment.