Commit d28bc6bf authored by Oleg Korshul's avatar Oleg Korshul

resize sync

parent 260331cb
......@@ -3502,9 +3502,9 @@ function CDemonstrationManager(htmlpage)
return false;
}
this.Resize = function()
this.Resize = function(isNoSend)
{
if (oThis.HtmlPage.m_oApi.reporterWindow)
if (isNoSend !== true && oThis.HtmlPage.m_oApi.reporterWindow)
{
var _msg_ = {
"main_command" : true,
......@@ -3513,6 +3513,14 @@ function CDemonstrationManager(htmlpage)
oThis.HtmlPage.m_oApi.sendToReporter(JSON.stringify(_msg_));
}
else if (isNoSend !== true && oThis.HtmlPage.m_oApi.isReporterMode)
{
var _msg_ = {
"reporter_command" : "resize"
};
oThis.HtmlPage.m_oApi.sendFromReporter(JSON.stringify(_msg_));
}
if (!this.Mode)
return;
......@@ -3520,9 +3528,11 @@ function CDemonstrationManager(htmlpage)
var _width = this.DemonstrationDiv.clientWidth;
var _height = this.DemonstrationDiv.clientHeight;
if (_width == this.DivWidth && _height == this.DivHeight)
if (_width == this.DivWidth && _height == this.DivHeight && true !== isNoSend)
return;
oThis.HtmlPage.m_oApi.disableReporterEvents = true;
this.DivWidth = _width;
this.DivHeight = _height;
......@@ -3542,6 +3552,8 @@ function CDemonstrationManager(htmlpage)
if (this.SlideNum < this.SlidesCount)
this.StartSlide(this.Transition.IsPlaying(), false);
oThis.HtmlPage.m_oApi.disableReporterEvents = false;
}
this.PointerMove = function(x, y, w, h)
......
......@@ -651,6 +651,7 @@
this.reporterWindow = null;
this.reporterStartObject = null;
this.isReporterMode = ("reporter" == config['using']) ? true : false;
this.disableReporterEvents = false;
if (this.isReporterMode)
{
......@@ -6009,6 +6010,11 @@ background-repeat: no-repeat;\
_this.WordControl.DemonstrationManager.Play();
break;
}
case "resize":
{
_this.WordControl.DemonstrationManager.Resize(true);
break;
}
default:
break;
}
......@@ -6040,6 +6046,9 @@ background-repeat: no-repeat;\
asc_docs_api.prototype.sendToReporter = function(value)
{
if (this.disableReporterEvents)
return;
if (window["AscDesktopEditor"])
{
window["AscDesktopEditor"]["sendToReporter"](value);
......@@ -6052,6 +6061,9 @@ background-repeat: no-repeat;\
asc_docs_api.prototype.sendFromReporter = function(value)
{
if (this.disableReporterEvents)
return;
if (window["AscDesktopEditor"])
{
window["AscDesktopEditor"]["sendFromReporter"](value);
......@@ -6092,7 +6104,7 @@ background-repeat: no-repeat;\
}
else if (undefined !== _obj["resize"])
{
_this.WordControl.DemonstrationManager.Resize();
_this.WordControl.DemonstrationManager.Resize(true);
}
else if (true === _obj["next"])
{
......@@ -6153,7 +6165,7 @@ background-repeat: no-repeat;\
this.WordControl.DemonstrationManager.EndShowMessage = this.EndShowMessage;
this.EndShowMessage = undefined;
}
this.WordControl.DemonstrationManager.Play();
this.WordControl.DemonstrationManager.Play(true);
if (this.reporterWindow)
this.sendToReporter("{ \"main_command\" : true, \"play\" : true }");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment