PresentationDashboard.prototype.onNavigationNext = function (presentationKey) { var presentation = this.state.presentations[presentationKey], nextSlideIndex = presentation.currentSlide + 1; console.log('next slide'); if (nextSlideIndex <= presentation.slides.length) { presentation.currentSlide = nextSlideIndex; R.refresh(this); } };
PresentationDashboard.prototype.onNavigationPrev = function (presentationKey) { var presentation = this.state.presentations[presentationKey], prevSlideIndex = presentation.currentSlide - 1; console.log('prev slide'); if (prevSlideIndex > 0) { presentation.currentSlide = prevSlideIndex; R.refresh(this); } };
PresentationDashboard.prototype.onAddSlideTextItem = function (presentationKey, slideKey, text) { var presentation = this.state.presentations[presentationKey], slide = presentation.slides[slideKey]; console.log('add slide text item'); slide.items.push({ type: 'text', text: text }); R.refresh(this); };
PresentationDashboard.prototype.onAddSlideImageItem = function (presentationKey, slideKey, imageData) { var presentation = this.state.presentations[presentationKey], slide = presentation.slides[slideKey]; console.log('add slide image item'); slide.items.push({ type: 'image', imageData: imageData }); R.refresh(this); };
PresentationDashboard.prototype.onAddSlide = function (presentationKey) { var presentation = this.state.presentations[presentationKey], slides = presentation.slides; console.log('add slide'); slides.push({ items: [] }); presentation.currentSlide = slides.length; R.refresh(this); };