Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit c2f57bd

Browse files
feat: reveal deckgo-lazy-img
1 parent 6a13805 commit c2f57bd

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

webcomponents/core/src/components/slides/deckdeckgo-slide.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class DeckdeckgoSlideUtils {
1919
return;
2020
}
2121

22-
const elements: NodeListOf<HTMLElement> = el.querySelectorAll(revealShowFirst ? '[slot] li:not(:first-child), [slot] > p:not(:first-child), [slot] > span:not(:first-child), [slot] > img:not(:first-child)' : '[slot] li, [slot] > p, [slot] > span, [slot] > img');
22+
const elements: NodeListOf<HTMLElement> = el.querySelectorAll(revealShowFirst ? '[slot] li:not(:first-child), [slot] > p:not(:first-child), [slot] > span:not(:first-child), [slot] > img:not(:first-child), [slot] > deckgo-lazy-img:not(:first-child)' : '[slot] li, [slot] > p, [slot] > span, [slot] > img, [slot] > deckgo-lazy-img');
2323

2424
if (!elements) {
2525
resolve();
@@ -39,7 +39,7 @@ export class DeckdeckgoSlideUtils {
3939

4040
private static showRevealElement(el: HTMLElement): Promise<boolean> {
4141
return new Promise<boolean>((resolve) => {
42-
const elements: NodeListOf<HTMLElement> = el.querySelectorAll('[slot] li, [slot] > p, [slot] > span, [slot] > img');
42+
const elements: NodeListOf<HTMLElement> = el.querySelectorAll('[slot] li, [slot] > p, [slot] > span, [slot] > img, [slot] > deckgo-lazy-img');
4343

4444
let couldSwipe: boolean = true;
4545

@@ -62,7 +62,7 @@ export class DeckdeckgoSlideUtils {
6262

6363
private static hideRevealElement(el: HTMLElement): Promise<boolean> {
6464
return new Promise<boolean>((resolve) => {
65-
const elements: NodeListOf<HTMLElement> = el.querySelectorAll('[slot] li, [slot] > p, [slot] > span, [slot] > img');
65+
const elements: NodeListOf<HTMLElement> = el.querySelectorAll('[slot] li, [slot] > p, [slot] > span, [slot] > img, [slot] > deckgo-lazy-img');
6666

6767
let couldSwipe: boolean = true;
6868

webcomponents/core/src/components/utils/deckdeckgo-utils.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,6 @@ export class DeckdeckgoUtils {
7272

7373
components.forEach(async (component: HTMLElement) => {
7474
await (component as any).lazyLoad();
75-
76-
// TODO: reveal?
77-
// if (image.getAttribute('data-src')) {
78-
79-
// If image is part of a reveal group, let it be revealed with the reveal feature
80-
81-
// if (!image.classList.contains('deckgo-reveal')) {
82-
// image.style.setProperty('visibility', 'inherit');
83-
// }
84-
// }
8575
});
8676

8777
resolve();

0 commit comments

Comments
 (0)