Skip to content

Commit

Permalink
[bug] for bug #72506
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey.Luzyanin authored and Sergey.Luzyanin committed Jan 17, 2025
1 parent e1a00ae commit f19d0a4
Showing 1 changed file with 34 additions and 6 deletions.
40 changes: 34 additions & 6 deletions slide/Drawing/Transitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -2755,10 +2755,11 @@ function CDemonstrationManager(htmlpage)

this.isMouseDown = false;
this.StartSlideNum = -1;
this.StartSlideObject = null;
this.TmpSlideVisible = -1;
this.LastMoveTime = null;

this.GoToSlideShortcutStack = [];
this.GoToSlideShortcutStack = [];

var oThis = this;

Expand Down Expand Up @@ -2958,12 +2959,22 @@ function CDemonstrationManager(htmlpage)

this.Start = function(main_div_id, start_slide_num, is_play_mode, is_no_fullscreen)
{
this.StartSlideNum = start_slide_num;
if (-1 == start_slide_num)
start_slide_num = 0;
let nStartSlideNum = start_slide_num;
if(Asc.editor.isMasterMode())
{
nStartSlideNum = 0;
this.StartSlideNum = nStartSlideNum;
this.StartSlideObject = this.HtmlPage.m_oApi.WordControl.m_oLogicDocument.GetCurrentSlide();
}
else
{
this.StartSlideNum = nStartSlideNum;
if (-1 == nStartSlideNum)
nStartSlideNum = 0;
}

this.DemonstrationDiv = document.getElementById(main_div_id);
if (this.DemonstrationDiv == null || start_slide_num < 0 || start_slide_num >= this.GetSlidesCount())
if (this.DemonstrationDiv == null || nStartSlideNum < 0 || nStartSlideNum >= this.GetSlidesCount())
return;

if (undefined !== window["AscDesktopEditor"] && (true !== is_no_fullscreen))
Expand All @@ -2985,7 +2996,7 @@ function CDemonstrationManager(htmlpage)
this.Canvas.width = AscCommon.AscBrowser.convertToRetinaValue(_width, true);
this.Canvas.height = AscCommon.AscBrowser.convertToRetinaValue(_height, true);

this.SlideNum = start_slide_num;
this.SlideNum = nStartSlideNum;

this.HtmlPage.m_oApi.sync_DemonstrationSlideChanged(this.SlideNum);

Expand Down Expand Up @@ -3429,6 +3440,23 @@ function CDemonstrationManager(htmlpage)
}

this.StartSlideNum = -1;
if(this.HtmlPage.m_oApi.isMasterMode())
{
if(this.StartSlideObject)
{
let oPresentation = this.HtmlPage.m_oApi.WordControl.m_oLogicDocument;
let nIdx = oPresentation.GetSlideIndex(this.StartSlideObject);
if(nIdx > -1)
{
this.HtmlPage.GoToPage(nIdx);
}
else
{
this.HtmlPage.GoToPage(0);
}
}
}
this.StartSlideObject = null;
this.StopAllAnimations();

};
Expand Down

0 comments on commit f19d0a4

Please sign in to comment.