跳到主要内容

onSlideShowSlideChanged

The function called when slide changes during a slide show presentation. Provides information about both the current and previous slide.

Parameters

NameData typeDescription
dataObjectThe object containing slide information.
data.slideIndexnumberThe index of the new slide.
data.previousSlideIndexnumberThe index of the previous slide (-1 if it's the first slide).
window.Asc.plugin.attachEditorEvent('onSlideShowSlideChanged', (data) => {
data.previousSlideIndex === -1
? console.log(`This is the first slide that we are showing
since the presentation slide show started`)
: console.log(`Slide changed during presentation:
from slide index ${data.previousSlideIndex}
to slide index ${data.slideIndex}`);
});