Commit 16badb2a authored by Oleg Korshul's avatar Oleg Korshul

.

parent aff13c1b
......@@ -3176,6 +3176,28 @@ function CDrawingDocument()
return null;
};
this.Notes_GetWidth = function()
{
if (!this.m_oWordControl.IsSupportNotes)
return 0;
if (!this.m_oWordControl.m_oNotesApi)
return 0;
return this.m_oWordControl.m_oNotesApi.GetNotesWidth();
};
this.Notes_OnRecalculate = function(slideNum, width, height)
{
if (!this.m_oWordControl.IsSupportNotes)
return;
if (!this.m_oWordControl.m_oNotesApi)
return;
this.m_oWordControl.m_oNotesApi.OnRecalculateNote(slideNum, width, height);
};
}
function CThPage()
......@@ -5405,7 +5427,7 @@ function CNotesDrawer(page)
var oThis = this;
this.Init = function()
this.Init = function ()
{
var _elem = this.HtmlPage.m_oNotes;
var _elemOverlay = this.HtmlPage.m_oNotesOverlay;
......@@ -5419,7 +5441,7 @@ function CNotesDrawer(page)
_elemOverlay.HtmlElement.onmouseup = this.onMouseUp;
};
this.OnUpdateOverlay = function()
this.OnUpdateOverlay = function ()
{
var overlay = this.m_oOverlayApi;
......@@ -5449,7 +5471,7 @@ function CNotesDrawer(page)
ctx = null;
};
this.OnPaint = function()
this.OnPaint = function ()
{
var element = this.HtmlPage.m_oNotes.HtmlElement;
var ctx = element.getContext('2d');
......@@ -5484,7 +5506,7 @@ function CNotesDrawer(page)
this.IsRepaint = false;
};
this.OnRecalculateNote = function(slideNum, width, height)
this.OnRecalculateNote = function (slideNum, width, height)
{
this.Slide = slideNum;
this.Width = width;
......@@ -5496,17 +5518,17 @@ function CNotesDrawer(page)
var element = this.HtmlPage.m_oNotes.HtmlElement;
var settings = {
showArrows : true,
animateScroll : false,
screenW : element.width,
screenH : element.height,
screenAddW : 0,
screenAddH : 0,
vsscrollStep : 45,
hsscrollStep : 45,
contentW : 2 * this.OffsetX + ((width * g_dKoef_mm_to_pix) >> 0),
contentH : 2 * this.OffsetY + ((height * g_dKoef_mm_to_pix) >> 0),
scrollerMinHeight : 5
showArrows: true,
animateScroll: false,
screenW: element.width,
screenH: element.height,
screenAddW: 0,
screenAddH: 0,
vsscrollStep: 45,
hsscrollStep: 45,
contentW: 1,
contentH: 2 * this.OffsetY + ((height * g_dKoef_mm_to_pix) >> 0),
scrollerMinHeight: 5
};
if (this.bIsRetinaSupport)
......@@ -5527,30 +5549,30 @@ function CNotesDrawer(page)
{
this.HtmlPage.m_oScrollNotes_ = new AscCommon.ScrollObject("id_vertical_scroll_notes", settings);
this.HtmlPage.m_oScrollNotes_.onLockMouse = function(evt)
this.HtmlPage.m_oScrollNotes_.onLockMouse = function (evt)
{
AscCommon.check_MouseDownEvent(evt, true);
global_mouseEvent.LockMouse();
};
this.HtmlPage.m_oScrollNotes_.offLockMouse = function(evt)
this.HtmlPage.m_oScrollNotes_.offLockMouse = function (evt)
{
AscCommon.check_MouseUpEvent(evt);
};
this.HtmlPage.m_oScrollNotes_.bind("scrollvertical", function(evt)
this.HtmlPage.m_oScrollNotes_.bind("scrollvertical", function (evt)
{
// TODO:
});
}
};
this.CheckPaint = function()
this.CheckPaint = function ()
{
if (this.IsRepaint)
this.OnPaint();
};
this.onMouseDown = function(e)
this.onMouseDown = function (e)
{
AscCommon.check_MouseDownEvent(e, true);
global_mouseEvent.LockMouse();
......@@ -5562,11 +5584,11 @@ function CNotesDrawer(page)
console.log(_x + ", " + _y);
};
this.onMouseMove = function(e)
this.onMouseMove = function (e)
{
AscCommon.check_MouseMoveEvent(e);
};
this.onMouseUp = function(e)
this.onMouseUp = function (e)
{
AscCommon.check_MouseUpEvent(e);
......@@ -5576,14 +5598,22 @@ function CNotesDrawer(page)
console.log(_x + ", " + _y);
};
this.onUpdateTarget = function()
this.onUpdateTarget = function ()
{
};
this.OnResize = function()
this.OnResize = function ()
{
this.HtmlPage.m_oLogicDocument.Notes_OnResize();
};
this.GetNotesWidth = function()
{
this.OnRecalculateNote(this.Slide, this.Width, this.Height);
var _pix_width = this.HtmlPage.m_oNotes.HtmlElement.width - 20;
if (_pix_width < 10)
_pix_width = 10;
return _pix_width / g_dKoef_mm_to_pix;
};
}
......
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