Skip to main content

Slide Service

The Slide Service provides access to a deck or presentations's slide data

Methods

getSlideById(slideId)

Description

  • Gets the chapter slide by the slideId which is the data-id property from the slide.

Return Value: Slide Object

Options:

  • slideId: String slideId of the desired slide.

Code Example

    this.slide = digideckCore.slideService.getSlideById(slideId);

getParentSlideId(element)

Description

  • Gets the parent slide id from the HTML Element slide node.

Return Value: String

Options:

  • element: HTML Element the element of the slide used to get parent slide.

Code Example

    this.parentSlideId = digideckCore.slideService.getParentSlideId(element);

getParentSlide(element)

Description

  • Gets the parent slide of element.

Return Value: Slide Object

Options:

  • element: HTML Element the element used to get the parent slide.

Code Example

    this.parentSlide = digideckCore.slideService.getParentSlide(element);

getActiveSlide()

Description

  • Gets the active slide from the deck or presentation.

Return Value: Slide Object

Code Example

    this.activeSlide = digideckCore.slideService.getActiveSlide();

getActiveChapter()

Description

  • Gets the active chapter from the deck or presentation.

Return Value: Slide Object

Code Example

    this.activeChapter = digideckCore.slideService.getActiveChapter();

getActiveChapterId()

Description

  • Gets the active chapter id from the deck or presentation.

Return Value: String

Code Example

    this.activeChapterId = digideckCore.slideService.getActiveChapterId();

isParentSlideActive(element)

Description

  • Returns a true or false value depending on if the parent of element is active.

Return Value: Boolean

Options:

  • element: HTML Element the element of the slide used to get parent information.

Code Example

    this.isParentSlideActive = digideckCore.slideService.isParentSlideActive(element);

isSlidePathValid(slidePath)

Description

  • Checks to see if the slidePath argument is a path to a slide or chapter in the deck or presentation.

Return Value: Boolean

Options:

  • slidePath: String hash path of a slide.

Code Example

    this.isSlidePathValid = digideckCore.slideService.isSlidePathValid(slidePath);