Commit 1c81a2c1 authored by Alexander.Trofimov's avatar Alexander.Trofimov

slide/api to function closure

parent 16a0bcb3
...@@ -3217,7 +3217,7 @@ function CThumbnailsManager() ...@@ -3217,7 +3217,7 @@ function CThumbnailsManager()
{ {
if (global_mouseEvent.Button == 2) if (global_mouseEvent.Button == 2)
{ {
var _data = new CContextMenuData(); var _data = new AscCommonSlide.CContextMenuData();
_data.Type = c_oAscContextMenuTypes.Thumbnails; _data.Type = c_oAscContextMenuTypes.Thumbnails;
_data.X_abs = global_mouseEvent.X - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.L * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.X; _data.X_abs = global_mouseEvent.X - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.L * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.X;
_data.Y_abs = global_mouseEvent.Y - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.T * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.Y; _data.Y_abs = global_mouseEvent.Y - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.T * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.Y;
...@@ -3306,7 +3306,7 @@ function CThumbnailsManager() ...@@ -3306,7 +3306,7 @@ function CThumbnailsManager()
if (global_mouseEvent.Button == 2 && !global_keyboardEvent.CtrlKey) if (global_mouseEvent.Button == 2 && !global_keyboardEvent.CtrlKey)
{ {
var _data = new CContextMenuData(); var _data = new AscCommonSlide.CContextMenuData();
_data.Type = c_oAscContextMenuTypes.Thumbnails; _data.Type = c_oAscContextMenuTypes.Thumbnails;
_data.X_abs = global_mouseEvent.X - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.L * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.X; _data.X_abs = global_mouseEvent.X - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.L * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.X;
_data.Y_abs = global_mouseEvent.Y - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.T * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.Y; _data.Y_abs = global_mouseEvent.Y - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.T * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.Y;
...@@ -3335,7 +3335,7 @@ function CThumbnailsManager() ...@@ -3335,7 +3335,7 @@ function CThumbnailsManager()
if (global_mouseEvent.Button == 2 && !global_keyboardEvent.CtrlKey) if (global_mouseEvent.Button == 2 && !global_keyboardEvent.CtrlKey)
{ {
var _data = new CContextMenuData(); var _data = new AscCommonSlide.CContextMenuData();
_data.Type = c_oAscContextMenuTypes.Thumbnails; _data.Type = c_oAscContextMenuTypes.Thumbnails;
_data.X_abs = global_mouseEvent.X - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.L * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.X; _data.X_abs = global_mouseEvent.X - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.L * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.X;
_data.Y_abs = global_mouseEvent.Y - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.T * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.Y; _data.Y_abs = global_mouseEvent.Y - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.T * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.Y;
...@@ -4831,7 +4831,7 @@ function CThumbnailsManager() ...@@ -4831,7 +4831,7 @@ function CThumbnailsManager()
var ConvertedPos = this.GetThumbnailPagePosition(nSlideIndex ); var ConvertedPos = this.GetThumbnailPagePosition(nSlideIndex );
if(ConvertedPos) if(ConvertedPos)
{ {
editor.sync_ContextMenuCallback(new CContextMenuData({ Type : c_oAscContextMenuTypes.Thumbnails, X_abs : ConvertedPos.X, Y_abs : ConvertedPos.Y, IsSlideSelect: true }) ); editor.sync_ContextMenuCallback(new AscCommonSlide.CContextMenuData({ Type : c_oAscContextMenuTypes.Thumbnails, X_abs : ConvertedPos.X, Y_abs : ConvertedPos.Y, IsSlideSelect: true }) );
} }
return false; return false;
} }
...@@ -4845,7 +4845,7 @@ function CThumbnailsManager() ...@@ -4845,7 +4845,7 @@ function CThumbnailsManager()
var ConvertedPos = this.GetThumbnailPagePosition(nSlideIndex ); var ConvertedPos = this.GetThumbnailPagePosition(nSlideIndex );
if(ConvertedPos) if(ConvertedPos)
{ {
editor.sync_ContextMenuCallback(new CContextMenuData({ Type : c_oAscContextMenuTypes.Thumbnails, X_abs : ConvertedPos.X, Y_abs : ConvertedPos.Y, IsSlideSelect: true }) ); editor.sync_ContextMenuCallback(new AscCommonSlide.CContextMenuData({ Type : c_oAscContextMenuTypes.Thumbnails, X_abs : ConvertedPos.X, Y_abs : ConvertedPos.Y, IsSlideSelect: true }) );
} }
return false; return false;
} }
......
...@@ -2708,7 +2708,7 @@ CPresentation.prototype = ...@@ -2708,7 +2708,7 @@ CPresentation.prototype =
{ {
var oPosition = this.Slides[this.CurPage].graphicObjects.getContextMenuPosition(0); var oPosition = this.Slides[this.CurPage].graphicObjects.getContextMenuPosition(0);
var ConvertedPos = this.DrawingDocument.ConvertCoordsToCursorWR( oPosition.X, oPosition.Y, this.PageNum ); var ConvertedPos = this.DrawingDocument.ConvertCoordsToCursorWR( oPosition.X, oPosition.Y, this.PageNum );
editor.sync_ContextMenuCallback(new CContextMenuData({ Type : c_oAscContextMenuTypes.Main, X_abs : ConvertedPos.X, Y_abs : ConvertedPos.Y }) ); editor.sync_ContextMenuCallback(new AscCommonSlide.CContextMenuData({ Type : c_oAscContextMenuTypes.Main, X_abs : ConvertedPos.X, Y_abs : ConvertedPos.Y }) );
} }
} }
...@@ -2915,7 +2915,7 @@ CPresentation.prototype = ...@@ -2915,7 +2915,7 @@ CPresentation.prototype =
} }
if(e.Button === AscCommon.g_mouse_button_right && !this.noShowContextMenu) if(e.Button === AscCommon.g_mouse_button_right && !this.noShowContextMenu)
{ {
var ContextData = new CContextMenuData(); var ContextData = new AscCommonSlide.CContextMenuData();
var ConvertedPos = this.DrawingDocument.ConvertCoordsToCursorWR( X, Y, PageIndex ); var ConvertedPos = this.DrawingDocument.ConvertCoordsToCursorWR( X, Y, PageIndex );
ContextData.X_abs = ConvertedPos.X; ContextData.X_abs = ConvertedPos.X;
ContextData.Y_abs = ConvertedPos.Y; ContextData.Y_abs = ConvertedPos.Y;
......
"use strict"; "use strict";
(function(window, document){
// Import // Import
var DownloadType = AscCommon.DownloadType; var DownloadType = AscCommon.DownloadType;
var locktype_None = AscCommon.locktype_None; var locktype_None = AscCommon.locktype_None;
...@@ -219,7 +221,7 @@ CAscChartProp.prototype.getStyle = function() ...@@ -219,7 +221,7 @@ CAscChartProp.prototype.getStyle = function()
CAscChartProp.prototype.putStyle = function(v) CAscChartProp.prototype.putStyle = function(v)
{ {
return this.ChartProperties && this.ChartProperties.putStyle(v); return this.ChartProperties && this.ChartProperties.putStyle(v);
} };
CAscChartProp.prototype.changeType = function(v) CAscChartProp.prototype.changeType = function(v)
{ {
...@@ -2496,7 +2498,7 @@ asc_docs_api.prototype.sync_ListType = function(NumPr){ ...@@ -2496,7 +2498,7 @@ asc_docs_api.prototype.sync_ListType = function(NumPr){
}; };
asc_docs_api.prototype.sync_TextColor = function(Color){ asc_docs_api.prototype.sync_TextColor = function(Color){
this.asc_fireCallback("asc_onTextColor", new AscCommon.CColor( Color.r, Color.g, Color.b )); this.asc_fireCallback("asc_onTextColor", new AscCommon.CColor( Color.r, Color.g, Color.b ));
} };
asc_docs_api.prototype.sync_TextColor2 = function(unifill) asc_docs_api.prototype.sync_TextColor2 = function(unifill)
{ {
var _color; var _color;
...@@ -2529,28 +2531,28 @@ asc_docs_api.prototype.sync_TextColor2 = function(unifill) ...@@ -2529,28 +2531,28 @@ asc_docs_api.prototype.sync_TextColor2 = function(unifill)
color.asc_putB(_color.B); color.asc_putB(_color.B);
this.asc_fireCallback("asc_onTextColor", color); this.asc_fireCallback("asc_onTextColor", color);
} }
} };
asc_docs_api.prototype.sync_TextHighLight = function(HighLight){ asc_docs_api.prototype.sync_TextHighLight = function(HighLight){
this.asc_fireCallback("asc_onTextHighLight", new AscCommon.CColor( HighLight.r, HighLight.g, HighLight.b ) ); this.asc_fireCallback("asc_onTextHighLight", new AscCommon.CColor( HighLight.r, HighLight.g, HighLight.b ) );
} };
asc_docs_api.prototype.sync_ParaStyleName = function(Name){ asc_docs_api.prototype.sync_ParaStyleName = function(Name){
this.asc_fireCallback("asc_onParaStyleName",Name); this.asc_fireCallback("asc_onParaStyleName",Name);
} };
asc_docs_api.prototype.sync_ParaSpacingLine = function(SpacingLine){ asc_docs_api.prototype.sync_ParaSpacingLine = function(SpacingLine){
this.asc_fireCallback("asc_onParaSpacingLine", new AscCommon.asc_CParagraphSpacing ( SpacingLine )); this.asc_fireCallback("asc_onParaSpacingLine", new AscCommon.asc_CParagraphSpacing ( SpacingLine ));
} };
asc_docs_api.prototype.sync_PageBreakCallback = function(isBreak){ asc_docs_api.prototype.sync_PageBreakCallback = function(isBreak){
this.asc_fireCallback("asc_onPageBreak",isBreak); this.asc_fireCallback("asc_onPageBreak",isBreak);
} };
asc_docs_api.prototype.sync_KeepLinesCallback = function(isKeepLines){ asc_docs_api.prototype.sync_KeepLinesCallback = function(isKeepLines){
this.asc_fireCallback("asc_onKeepLines",isKeepLines); this.asc_fireCallback("asc_onKeepLines",isKeepLines);
} };
asc_docs_api.prototype.sync_ShowParaMarksCallback = function(){ asc_docs_api.prototype.sync_ShowParaMarksCallback = function(){
this.asc_fireCallback("asc_onShowParaMarks"); this.asc_fireCallback("asc_onShowParaMarks");
} };
asc_docs_api.prototype.sync_SpaceBetweenPrgCallback = function(){ asc_docs_api.prototype.sync_SpaceBetweenPrgCallback = function(){
this.asc_fireCallback("asc_onSpaceBetweenPrg"); this.asc_fireCallback("asc_onSpaceBetweenPrg");
} };
asc_docs_api.prototype.sync_PrPropCallback = function(prProp){ asc_docs_api.prototype.sync_PrPropCallback = function(prProp){
var _len = this.SelectedObjectsStack.length; var _len = this.SelectedObjectsStack.length;
if (_len > 0) if (_len > 0)
...@@ -2563,7 +2565,7 @@ asc_docs_api.prototype.sync_PrPropCallback = function(prProp){ ...@@ -2563,7 +2565,7 @@ asc_docs_api.prototype.sync_PrPropCallback = function(prProp){
} }
this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( c_oAscTypeSelectElement.Paragraph, new Asc.asc_CParagraphProperty( prProp ) ); this.SelectedObjectsStack[this.SelectedObjectsStack.length] = new asc_CSelectedObject( c_oAscTypeSelectElement.Paragraph, new Asc.asc_CParagraphProperty( prProp ) );
} };
asc_docs_api.prototype.SetDrawImagePlaceParagraph = function(element_id, props) asc_docs_api.prototype.SetDrawImagePlaceParagraph = function(element_id, props)
{ {
...@@ -5494,6 +5496,7 @@ window["AscDesktopEditor_Save"] = function() ...@@ -5494,6 +5496,7 @@ window["AscDesktopEditor_Save"] = function()
//-------------------------------------------------------------export--------------------------------------------------- //-------------------------------------------------------------export---------------------------------------------------
window['Asc'] = window['Asc'] || {}; window['Asc'] = window['Asc'] || {};
window['AscCommonSlide'] = window['AscCommonSlide'] || {};
window['Asc']['asc_docs_api'] = asc_docs_api; window['Asc']['asc_docs_api'] = asc_docs_api;
asc_docs_api.prototype['asc_GetFontThumbnailsPath'] = asc_docs_api.prototype.asc_GetFontThumbnailsPath; asc_docs_api.prototype['asc_GetFontThumbnailsPath'] = asc_docs_api.prototype.asc_GetFontThumbnailsPath;
asc_docs_api.prototype['pre_Save'] = asc_docs_api.prototype.pre_Save; asc_docs_api.prototype['pre_Save'] = asc_docs_api.prototype.pre_Save;
...@@ -5913,6 +5916,7 @@ CHyperlinkProperty.prototype['get_ToolTip'] = CHyperlinkProperty.prototype.get_T ...@@ -5913,6 +5916,7 @@ CHyperlinkProperty.prototype['get_ToolTip'] = CHyperlinkProperty.prototype.get_T
CHyperlinkProperty.prototype['put_ToolTip'] = CHyperlinkProperty.prototype.put_ToolTip; CHyperlinkProperty.prototype['put_ToolTip'] = CHyperlinkProperty.prototype.put_ToolTip;
CHyperlinkProperty.prototype['get_Text'] = CHyperlinkProperty.prototype.get_Text; CHyperlinkProperty.prototype['get_Text'] = CHyperlinkProperty.prototype.get_Text;
CHyperlinkProperty.prototype['put_Text'] = CHyperlinkProperty.prototype.put_Text; CHyperlinkProperty.prototype['put_Text'] = CHyperlinkProperty.prototype.put_Text;
window['AscCommonSlide'].CContextMenuData = CContextMenuData;
CContextMenuData.prototype['get_Type'] = CContextMenuData.prototype.get_Type; CContextMenuData.prototype['get_Type'] = CContextMenuData.prototype.get_Type;
CContextMenuData.prototype['get_X'] = CContextMenuData.prototype.get_X; CContextMenuData.prototype['get_X'] = CContextMenuData.prototype.get_X;
CContextMenuData.prototype['get_Y'] = CContextMenuData.prototype.get_Y; CContextMenuData.prototype['get_Y'] = CContextMenuData.prototype.get_Y;
...@@ -6025,3 +6029,4 @@ CTablePropLook.prototype['get_BandHor'] = CTablePropLook.prototype.get_BandHor; ...@@ -6025,3 +6029,4 @@ CTablePropLook.prototype['get_BandHor'] = CTablePropLook.prototype.get_BandHor;
CTablePropLook.prototype['put_BandHor'] = CTablePropLook.prototype.put_BandHor; CTablePropLook.prototype['put_BandHor'] = CTablePropLook.prototype.put_BandHor;
CTablePropLook.prototype['get_BandVer'] = CTablePropLook.prototype.get_BandVer; CTablePropLook.prototype['get_BandVer'] = CTablePropLook.prototype.get_BandVer;
CTablePropLook.prototype['put_BandVer'] = CTablePropLook.prototype.put_BandVer; CTablePropLook.prototype['put_BandVer'] = CTablePropLook.prototype.put_BandVer;
})(window, window.document);
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