How to use the @deckdeckgo/deck-utils.getSlideDefinition function in @deckdeckgo/deck-utils

To help you get started, we’ve selected a few @deckdeckgo/deck-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github deckgo / deckdeckgo / webcomponents / core / src / components / deck / deckdeckgo-deck / deckdeckgo-deck.tsx View on Github external
return new Promise(async (resolve) => {
      const slide: HTMLElement = this.el.querySelector('.deckgo-slide-container:nth-child(' + (index + 1) + ')');

      const definition: DeckdeckgoSlideDefinition | null = await getSlideDefinition(slide);

      resolve(definition);
    });
  }
github deckgo / deckdeckgo / studio / src / app / handlers / editor / events / remote / remote-events.handler.tsx View on Github external
return new Promise(async (resolve) => {
            if (!slide) {
                resolve();
                return;
            }

            const deck: HTMLElement = self.el.querySelector('deckgo-deck');

            if (!deck || !deck.hasChildNodes()) {
                resolve();
                return;
            }

            const index = Array.prototype.indexOf.call(deck.children, slide);

            const slideDefinition: DeckdeckgoSlideDefinition | null = await getSlideDefinition(slide);

            await self.updateSlideDefinition(self, slideDefinition, index);

            resolve();
        });
    }

@deckdeckgo/deck-utils

Utils for the DeckDeckGo presentations

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis