|
|
@ -11578,7 +11578,7 @@ this.getTargetDocContent(undefined,true);if(oTargetDocContent){oState.Pos=oTarge
|
|
|
|
this.clearTrackObjects();this.resetSelection(undefined,undefined,true);this.changeCurrentState(new AscFormat.NullState(this));return this.loadDocumentStateAfterLoadChanges(oState)},loadDocumentStateAfterLoadChanges:DrawingObjectsController.prototype.loadDocumentStateAfterLoadChanges,checkTrackDrawings:DrawingObjectsController.prototype.checkTrackDrawings,canChangeWrapPolygon:function(){return!this.selection.groupSelection&&!this.selection.textSelection&&!this.selection.chartSelection&&this.selectedObjects.length===
|
|
|
|
this.clearTrackObjects();this.resetSelection(undefined,undefined,true);this.changeCurrentState(new AscFormat.NullState(this));return this.loadDocumentStateAfterLoadChanges(oState)},loadDocumentStateAfterLoadChanges:DrawingObjectsController.prototype.loadDocumentStateAfterLoadChanges,checkTrackDrawings:DrawingObjectsController.prototype.checkTrackDrawings,canChangeWrapPolygon:function(){return!this.selection.groupSelection&&!this.selection.textSelection&&!this.selection.chartSelection&&this.selectedObjects.length===
|
|
|
|
1&&this.selectedObjects[0].canChangeWrapPolygon&&this.selectedObjects[0].canChangeWrapPolygon()&&!this.selectedObjects[0].parent.Is_Inline()},startChangeWrapPolygon:function(){if(this.canChangeWrapPolygon()){var bNeedBehindDoc=this.getCompatibilityMode()<AscCommon.document_compatibility_mode_Word15;if(this.selectedObjects[0].parent.wrappingType!==WRAPPING_TYPE_THROUGH||this.selectedObjects[0].parent.wrappingType!==WRAPPING_TYPE_TIGHT||this.selectedObjects[0].parent.behindDoc!==bNeedBehindDoc)if(false===
|
|
|
|
1&&this.selectedObjects[0].canChangeWrapPolygon&&this.selectedObjects[0].canChangeWrapPolygon()&&!this.selectedObjects[0].parent.Is_Inline()},startChangeWrapPolygon:function(){if(this.canChangeWrapPolygon()){var bNeedBehindDoc=this.getCompatibilityMode()<AscCommon.document_compatibility_mode_Word15;if(this.selectedObjects[0].parent.wrappingType!==WRAPPING_TYPE_THROUGH||this.selectedObjects[0].parent.wrappingType!==WRAPPING_TYPE_TIGHT||this.selectedObjects[0].parent.behindDoc!==bNeedBehindDoc)if(false===
|
|
|
|
this.document.Document_Is_SelectionLocked(changestype_Drawing_Props,{Type:AscCommon.changestype_2_Element_and_Type,Element:this.selectedObjects[0].parent.Get_ParentParagraph(),CheckType:AscCommon.changestype_Paragraph_Content})){this.document.StartAction(AscDFH.historydescription_Document_GrObjectsChangeWrapPolygon);this.selectedObjects[0].parent.Set_WrappingType(WRAPPING_TYPE_TIGHT);this.selectedObjects[0].parent.Set_BehindDoc(bNeedBehindDoc);this.selectedObjects[0].parent.Check_WrapPolygon();this.document.Recalculate();
|
|
|
|
this.document.Document_Is_SelectionLocked(changestype_Drawing_Props,{Type:AscCommon.changestype_2_Element_and_Type,Element:this.selectedObjects[0].parent.Get_ParentParagraph(),CheckType:AscCommon.changestype_Paragraph_Content})){this.document.StartAction(AscDFH.historydescription_Document_GrObjectsChangeWrapPolygon);this.selectedObjects[0].parent.Set_WrappingType(WRAPPING_TYPE_TIGHT);this.selectedObjects[0].parent.Set_BehindDoc(bNeedBehindDoc);this.selectedObjects[0].parent.Check_WrapPolygon();this.document.Recalculate();
|
|
|
|
this.document.UpdateInterface();this.document.FinalizeAction()}this.resetInternalSelection();this.selection.wrapPolygonSelection=this.selectedObjects[0];this.updateOverlay()}},removeById:function(pageIndex,id){var object=g_oTableId.Get_ById(id);if(isRealObject(object)){var hdr_ftr=object.DocumentContent.IsHdrFtr(true);var page=!hdr_ftr?this.graphicPages[pageIndex]:null;if(isRealObject(page))page.delObjectById(id)}},Remove_ById:function(id){for(var i=0;i<this.graphicPages.length;++i)this.removeById(i,
|
|
|
|
this.document.UpdateInterface();this.document.FinalizeAction()}this.resetInternalSelection();this.selection.wrapPolygonSelection=this.selectedObjects[0];this.updateOverlay()}},removeById:function(pageIndex,id){var object=g_oTableId.Get_ById(id);if(isRealObject(object)){var hdr_ftr=object.DocumentContent&&object.DocumentContent.IsHdrFtr(true);var page=!hdr_ftr?this.graphicPages[pageIndex]:null;if(isRealObject(page))page.delObjectById(id)}},Remove_ById:function(id){for(var i=0;i<this.graphicPages.length;++i)this.removeById(i,
|
|
|
|
id)},selectById:function(id,pageIndex){this.resetSelection();var obj=g_oTableId.Get_ById(id),nPageIndex=pageIndex;if(obj&&obj.GraphicObj){if(obj.DocumentContent&&obj.DocumentContent.IsHdrFtr()){if(obj.DocumentContent.Get_StartPage_Absolute()!==obj.PageNum)nPageIndex=obj.PageNum}else if(AscFormat.isRealNumber(obj.PageNum))nPageIndex=obj.PageNum;obj.GraphicObj.select(this,nPageIndex)}},calculateAfterChangeTheme:function(){for(var i=0;i<this.drawingObjects.length;++i)this.drawingObjects[i].calculateAfterChangeTheme();
|
|
|
|
id)},selectById:function(id,pageIndex){this.resetSelection();var obj=g_oTableId.Get_ById(id),nPageIndex=pageIndex;if(obj&&obj.GraphicObj){if(obj.DocumentContent&&obj.DocumentContent.IsHdrFtr()){if(obj.DocumentContent.Get_StartPage_Absolute()!==obj.PageNum)nPageIndex=obj.PageNum}else if(AscFormat.isRealNumber(obj.PageNum))nPageIndex=obj.PageNum;obj.GraphicObj.select(this,nPageIndex)}},calculateAfterChangeTheme:function(){for(var i=0;i<this.drawingObjects.length;++i)this.drawingObjects[i].calculateAfterChangeTheme();
|
|
|
|
editor.SyncLoadImages(this.urlMap);this.urlMap=[]},updateSelectionState:function(){return},drawSelectionPage:function(pageIndex){var oMatrix=null;if(this.selection.textSelection){if(this.selection.textSelection.selectStartPage===pageIndex){if(this.selection.textSelection.transformText)oMatrix=this.selection.textSelection.transformText.CreateDublicate();this.drawingDocument.UpdateTargetTransform(oMatrix);this.selection.textSelection.getDocContent().DrawSelectionOnPage(0)}}else if(this.selection.groupSelection){if(this.selection.groupSelection.selectStartPage===
|
|
|
|
editor.SyncLoadImages(this.urlMap);this.urlMap=[]},updateSelectionState:function(){return},drawSelectionPage:function(pageIndex){var oMatrix=null;if(this.selection.textSelection){if(this.selection.textSelection.selectStartPage===pageIndex){if(this.selection.textSelection.transformText)oMatrix=this.selection.textSelection.transformText.CreateDublicate();this.drawingDocument.UpdateTargetTransform(oMatrix);this.selection.textSelection.getDocContent().DrawSelectionOnPage(0)}}else if(this.selection.groupSelection){if(this.selection.groupSelection.selectStartPage===
|
|
|
|
pageIndex)this.selection.groupSelection.drawSelectionPage(0)}else if(this.selection.chartSelection&&this.selection.chartSelection.selectStartPage===pageIndex&&this.selection.chartSelection.selection.textSelection){if(this.selection.chartSelection.selection.textSelection.transformText)oMatrix=this.selection.chartSelection.selection.textSelection.transformText.CreateDublicate();this.drawingDocument.UpdateTargetTransform(oMatrix);this.selection.chartSelection.selection.textSelection.getDocContent().DrawSelectionOnPage(0)}},
|
|
|
|
pageIndex)this.selection.groupSelection.drawSelectionPage(0)}else if(this.selection.chartSelection&&this.selection.chartSelection.selectStartPage===pageIndex&&this.selection.chartSelection.selection.textSelection){if(this.selection.chartSelection.selection.textSelection.transformText)oMatrix=this.selection.chartSelection.selection.textSelection.transformText.CreateDublicate();this.drawingDocument.UpdateTargetTransform(oMatrix);this.selection.chartSelection.selection.textSelection.getDocContent().DrawSelectionOnPage(0)}},
|
|
|
|