Commit f645d565 authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix Bug 35468

parent 76226ab6
......@@ -3346,6 +3346,7 @@ function CDrawingDocument()
this.Notes_OnRecalculate = function(slideNum, width, height)
{
console.log('Notes_OnRecalculate: ' + slideNum);
if (!this.m_oWordControl.IsSupportNotes)
return;
......
......@@ -276,9 +276,12 @@
};
CNotes.prototype.showDrawingObjects = function(){
var oPresentation = editor.WordControl.m_oLogicDocument;
if(this.slide){
if(oPresentation.CurPage === this.slide.num){
editor.WordControl.m_oDrawingDocument.Notes_OnRecalculate(this.slide.num, this.slide.NotesWidth, this.slide.getNotesHeight());
}
}
};
CNotes.prototype.OnUpdateOverlay = function()
......
......@@ -3559,6 +3559,9 @@ CPresentation.prototype =
Notes_OnMouseUp : function(e, X, Y)
{
if(!this.FocusOnNotes){
return;
}
var oCurSlide = this.Slides[this.CurPage];
if(oCurSlide && oCurSlide.notes){
e.ctrlKey = e.CtrlKey;
......@@ -3581,6 +3584,9 @@ CPresentation.prototype =
Notes_OnMouseMove : function(e, X, Y)
{
// if(!this.FocusOnNotes){
// return;
// }
var oCurSlide = this.Slides[this.CurPage];
if(oCurSlide){
if(oCurSlide.notes){
......@@ -4265,18 +4271,17 @@ CPresentation.prototype =
return;
}
var oldCurPage = this.CurPage;
this.CurPage = Math.min( this.Slides.length - 1, Math.max( 0, PageNum ) );
if(oldCurPage != this.CurPage && this.CurPage < this.Slides.length)
var nNewCurrentPage = Math.min( this.Slides.length - 1, Math.max( 0, PageNum ) );
if(nNewCurrentPage !== this.CurPage && this.CurPage < this.Slides.length)
{
this.FocusOnNotes = false;
if(this.Slides[oldCurPage])
{
this.Slides[oldCurPage].graphicObjects.resetSelectionState();
var oCurrentController = this.GetCurrentController();
if(oCurrentController){
oCurrentController.resetSelectionState();
}
if(!this.Notes_OnResize()){
this.CurPage = nNewCurrentPage;
this.FocusOnNotes = false;
this.Notes_OnResize();
this.DrawingDocument.Notes_OnRecalculate(this.CurPage, this.Slides[this.CurPage].NotesWidth, this.Slides[this.CurPage].getNotesHeight());
}
editor.asc_hideComments();
this.Document_UpdateInterfaceState();
}
......
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