Commit 706b09e7 authored by Oleg Korshul's avatar Oleg Korshul

notes

parent 50630583
......@@ -2132,6 +2132,15 @@ function CDrawingDocument()
var dKoefY = hDst / this.m_oLogicDocument.Height;
var overlay = this.m_oWordControl.m_oOverlayApi;
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;
yDst = -this.m_oWordControl.m_oNotesApi.Scroll;
dKoefX = g_dKoef_mm_to_pix;
dKoefY = g_dKoef_mm_to_pix;
}
if (null == this.TextMatrix || global_MatrixTransformer.IsIdentity(this.TextMatrix))
{
var _x = ((xDst + dKoefX * x + 0.5) >> 0) - 0.5;
......@@ -5486,36 +5495,6 @@ function CNotesDrawer(page)
}
};
this.OnUpdateOverlay = function ()
{
var overlay = this.m_oOverlayApi;
overlay.SetBaseTransform();
overlay.Clear();
if (this.Slide == -1)
return;
var logicDocument = this.HtmlPage.m_oLogicDocument;
var ctx = overlay.m_oContext;
if (drDoc.m_bIsSelection)
{
ctx.fillStyle = "rgba(51,102,204,255)";
ctx.strokeStyle = "#9ADBFE";
ctx.beginPath();
logicDocument.drawNotesSelect(1);
ctx.globalAlpha = 0.2;
ctx.fill();
ctx.globalAlpha = 1.0;
}
ctx.globalAlpha = 1.0;
ctx = null;
};
this.OnPaint = function ()
{
var element = this.HtmlPage.m_oNotes.HtmlElement;
......@@ -5638,6 +5617,7 @@ function CNotesDrawer(page)
}
_x -= oThis.OffsetX;
_y += oThis.Scroll;
_x *= g_dKoef_pix_to_mm;
_y *= g_dKoef_pix_to_mm;
......@@ -5652,6 +5632,7 @@ function CNotesDrawer(page)
var _y = global_mouseEvent.Y - oThis.HtmlPage.Y - ((oThis.HtmlPage.m_oNotesContainer.AbsolutePosition.T * g_dKoef_mm_to_pix + 0.5) >> 0);
_x -= oThis.OffsetX;
_y += oThis.Scroll;
_x *= g_dKoef_pix_to_mm;
_y *= g_dKoef_pix_to_mm;
oThis.HtmlPage.m_oLogicDocument.Notes_OnMouseMove(global_mouseEvent, _x, _y);
......@@ -5670,6 +5651,7 @@ function CNotesDrawer(page)
}
_x -= oThis.OffsetX;
_y += oThis.Scroll;
_x *= g_dKoef_pix_to_mm;
_y *= g_dKoef_pix_to_mm;
oThis.HtmlPage.m_oLogicDocument.Notes_OnMouseUp(global_mouseEvent, _x, _y);
......
......@@ -2725,6 +2725,18 @@ function CEditorPage(api)
this.m_oApi.checkLastWork();
var overlay = this.m_oOverlayApi;
var overlayNotes = null;
var isDrawNotes = false;
if (this.IsSupportNotes && this.m_oNotesApi)
{
overlayNotes = this.m_oNotesApi.m_oOverlayApi;
overlayNotes.SetBaseTransform();
overlayNotes.Clear();
if (this.m_oLogicDocument.IsFocusOnNotes())
isDrawNotes = true;
}
overlay.SetBaseTransform();
overlay.Clear();
......@@ -2773,8 +2785,7 @@ function CEditorPage(api)
{
ctx.fillStyle = "rgba(51,102,204,255)";
ctx.strokeStyle = "#9ADBFE";
//ctx.strokeStyle = "rgba(206,238,255,255)";
//ctx.strokeStyle = "#FFFFFF";
ctx.beginPath();
if (drDoc.SlideCurrent != -1)
......@@ -2791,6 +2802,25 @@ function CEditorPage(api)
this.MobileTouchManager.CheckSelect(overlay);
}
if (isDrawNotes && drDoc.m_bIsSelection)
{
var ctxOverlay = overlayNotes.m_oContext;
ctxOverlay.fillStyle = "rgba(51,102,204,255)";
ctxOverlay.strokeStyle = "#9ADBFE";
ctxOverlay.beginPath();
if (drDoc.SlideCurrent != -1)
this.m_oLogicDocument.Slides[drDoc.SlideCurrent].drawNotesSelect();
ctxOverlay.globalAlpha = 0.2;
ctxOverlay.fill();
ctxOverlay.globalAlpha = 1.0;
ctxOverlay.stroke();
ctxOverlay.beginPath();
ctxOverlay.globalAlpha = 1.0;
}
if (this.MobileTouchManager)
this.MobileTouchManager.CheckTableRules(overlay);
......
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