Commit d1718df1 authored by Oleg Korshul's avatar Oleg Korshul

notes retina support

parent 92428036
......@@ -2256,7 +2256,7 @@ function CDrawingDocument()
if (this.m_oWordControl.IsSupportNotes && this.m_oWordControl.m_oNotesApi && this.m_oLogicDocument.IsFocusOnNotes())
{
overlay = this.m_oWordControl.m_oNotesApi.m_oOverlayApi;
xDst = this.m_oWordControl.m_oNotesApi.OffsetX;
xDst = AscCommon.AscBrowser.convertToRetinaValue(this.m_oWordControl.m_oNotesApi.OffsetX);
yDst = -this.m_oWordControl.m_oNotesApi.Scroll;
dKoefX = g_dKoef_mm_to_pix;
dKoefY = g_dKoef_mm_to_pix;
......@@ -5701,7 +5701,7 @@ function CNotesDrawer(page)
g.SaveGrState();
g.m_oCoordTransform.tx = this.OffsetX;
g.m_oCoordTransform.ty = -this.Scroll;
g.m_oCoordTransform.ty = AscCommon.AscBrowser.convertToRetinaValue(-this.Scroll, true);
g.transform(1, 0, 0, 1, 0, 0);
//g.IsNoDrawingEmptyPlaceholder = true;
......@@ -5740,7 +5740,7 @@ function CNotesDrawer(page)
scrollerMinHeight: 5
};
if (this.bIsRetinaSupport)
if (this.HtmlPage.bIsRetinaSupport)
{
settings.screenW = AscCommon.AscBrowser.convertToRetinaValue(settings.screenW);
settings.screenH = AscCommon.AscBrowser.convertToRetinaValue(settings.screenH);
......@@ -5962,9 +5962,10 @@ function CNotesDrawer(page)
this.GetNotesWidth = function()
{
var _pix_width = this.HtmlPage.m_oNotes.HtmlElement.width - 20;
var _pix_width = this.HtmlPage.m_oNotes.HtmlElement.width - AscCommon.AscBrowser.convertToRetinaValue(20, true);
if (_pix_width < 10)
_pix_width = 10;
_pix_width = AscCommon.AscBrowser.convertToRetinaValue(_pix_width);
return _pix_width / g_dKoef_mm_to_pix;
};
}
......
......@@ -704,7 +704,8 @@ function CEditorPage(api)
_elem.innerHTML = "Slide " + _current + " of " + _count;
window.editor.WordControl.Thumbnails.SelectPage(_current - 1);
//window.editor.WordControl.Thumbnails.SelectPage(_current - 1);
window.editor.WordControl.GoToPage(_current - 1, false, false, true);
});
this.m_oApi.asc_registerCallback("asc_onEndDemonstration", function ()
......@@ -878,11 +879,17 @@ function CEditorPage(api)
{
this.bIsRetinaSupport = AscCommon.AscBrowser.isRetina;
this.m_oOverlayApi.IsRetina = this.bIsRetinaSupport;
if (this.m_oNotesApi && this.m_oNotesApi.m_oOverlayApi)
this.m_oNotesApi.m_oOverlayApi.IsRetina = this.bIsRetinaSupport;
}
else
{
this.bIsRetinaSupport = false;
this.m_oOverlayApi.IsRetina = this.bIsRetinaSupport;
if (this.m_oNotesApi && this.m_oNotesApi.m_oOverlayApi)
this.m_oNotesApi.m_oOverlayApi.IsRetina = this.bIsRetinaSupport;
}
if (old != this.bIsRetinaSupport)
......@@ -900,7 +907,9 @@ function CEditorPage(api)
(htmlElem.id == "id_viewer_overlay" && this.m_oOverlayApi.IsRetina) ||
htmlElem.id == "id_hor_ruler" ||
htmlElem.id == "id_vert_ruler" ||
htmlElem.id == "id_buttonTabs")
htmlElem.id == "id_buttonTabs" ||
htmlElem.id == "id_notes" ||
(htmlElem.id == "id_notes_overlay" && this.m_oOverlayApi.IsRetina))
return true;
}
return false;
......@@ -3850,7 +3859,7 @@ function CEditorPage(api)
this.m_oDrawingDocument.CheckGuiControlColors(bIsAttack);
};
this.GoToPage = function(lPageNum, isFromZoom, bIsAttack)
this.GoToPage = function(lPageNum, isFromZoom, bIsAttack, isReporterUpdateSlide)
{
if (this.m_oApi.isReporterMode)
{
......@@ -3861,7 +3870,7 @@ function CEditorPage(api)
this.m_oApi.sendEvent("asc_onDemonstrationFirstRun");
window.postMessage("{ \"reporter_command\" : \"start_show\" }", "*");
}
else
else if (true !== isReporterUpdateSlide)
{
this.m_oApi.DemonstrationGoToSlide(lPageNum);
}
......
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