Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicola Lanzilotto committed Apr 17, 2024
1 parent 14afb15 commit a823ce8
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/app/widget_components/widget-set-up/widget-set-up.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1439,10 +1439,10 @@ export class WidgetSetUp extends WidgetSetUpBaseComponent implements OnInit, Aft
let firstPanel = <HTMLElement>firstAccordion.nextElementSibling;
this.logger.log('[WIDGET-SET-UP] ACCORDION firstPanel', firstPanel)

const hasClosedFirstAccordion = this.localDbService.getFromStorage('hasclosedfirstaccordion')
this.logger.log('[WIDGET-SET-UP] hasClosedFirstAccordion get from storage', hasClosedFirstAccordion)
if (hasClosedFirstAccordion === null || hasClosedFirstAccordion === 'false') {
this.logger.log('[WIDGET-SET-UP] hasClosedFirstAccordion HERE YES ', hasClosedFirstAccordion)
// const hasClosedFirstAccordion = this.localDbService.getFromStorage('hasclosedfirstaccordion')
// this.logger.log('[WIDGET-SET-UP] hasClosedFirstAccordion get from storage', hasClosedFirstAccordion)
// if (hasClosedFirstAccordion === null || hasClosedFirstAccordion === 'false') {
// this.logger.log('[WIDGET-SET-UP] hasClosedFirstAccordion HERE YES ', hasClosedFirstAccordion)
setTimeout(() => {
firstAccordion.classList.add("active");
firstPanel.style.maxHeight = firstPanel.scrollHeight + "px";
Expand All @@ -1454,7 +1454,7 @@ export class WidgetSetUp extends WidgetSetUpBaseComponent implements OnInit, Aft
// this.logger.log('[WIDGET-SET-UP] ACCORDION ARROW ICON', arrow_icon);
arrow_icon.classList.add("arrow-up");
}, 2000);
}
// }

// var arrow_icon_div = firstAccordion.children[1];
// console.log('[WIDGET-SET-UP] ACCORDION ARROW ICON WRAP DIV', arrow_icon_div);
Expand All @@ -1471,15 +1471,15 @@ export class WidgetSetUp extends WidgetSetUpBaseComponent implements OnInit, Aft
// console.log('firstPanel', firstPanel)
// console.log('[WIDGET-SET-UP] ACCORDION click acc[0]', acc[0]);

setTimeout(() => {
// console.log('firstAccordion contains class active', firstAccordion.classList.contains('active'))
// setTimeout(() => {
// // console.log('firstAccordion contains class active', firstAccordion.classList.contains('active'))

if (firstAccordion.classList.contains('active')) {
self.localDbService.setInStorage('hasclosedfirstaccordion', 'false')
} else if (!firstAccordion.classList.contains('active')) {
self.localDbService.setInStorage('hasclosedfirstaccordion', 'true')
}
}, 2000);
// if (firstAccordion.classList.contains('active')) {
// self.localDbService.setInStorage('hasclosedfirstaccordion', 'false')
// } else if (!firstAccordion.classList.contains('active')) {
// self.localDbService.setInStorage('hasclosedfirstaccordion', 'true')
// }
// }, 2000);
self.logger.log('[WIDGET-SET-UP] ACCORDION click i', i, 'acc[i]', acc[i]);
// console.log('[WIDGET-SET-UP] ACCORDION click i', i, 'acc[i]', acc[i]);
this.classList.toggle("active");
Expand Down

0 comments on commit a823ce8

Please sign in to comment.