Commit 70404a8b authored by Alexander.Trofimov's avatar Alexander.Trofimov

slide/api to function closure

parent 7d5e67a5
......@@ -3241,7 +3241,7 @@ function CThumbnailsManager()
{
if (global_mouseEvent.Button == 2)
{
var _data = new CContextMenuData();
var _data = new AscCommonSlide.CContextMenuData();
_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.Y_abs = global_mouseEvent.Y - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.T * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.Y;
......@@ -3330,7 +3330,7 @@ function CThumbnailsManager()
if (global_mouseEvent.Button == 2 && !global_keyboardEvent.CtrlKey)
{
var _data = new CContextMenuData();
var _data = new AscCommonSlide.CContextMenuData();
_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.Y_abs = global_mouseEvent.Y - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.T * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.Y;
......@@ -3359,7 +3359,7 @@ function CThumbnailsManager()
if (global_mouseEvent.Button == 2 && !global_keyboardEvent.CtrlKey)
{
var _data = new CContextMenuData();
var _data = new AscCommonSlide.CContextMenuData();
_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.Y_abs = global_mouseEvent.Y - ((oThis.m_oWordControl.m_oThumbnails.AbsolutePosition.T * g_dKoef_mm_to_pix) >> 0) - oThis.m_oWordControl.Y;
......@@ -4855,7 +4855,7 @@ function CThumbnailsManager()
var ConvertedPos = this.GetThumbnailPagePosition(nSlideIndex );
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;
}
......@@ -4869,7 +4869,7 @@ function CThumbnailsManager()
var ConvertedPos = this.GetThumbnailPagePosition(nSlideIndex );
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;
}
......
......@@ -2732,7 +2732,7 @@ CPresentation.prototype =
{
var oPosition = this.Slides[this.CurPage].graphicObjects.getContextMenuPosition(0);
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 }) );
}
}
......@@ -2939,7 +2939,7 @@ CPresentation.prototype =
}
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 );
ContextData.X_abs = ConvertedPos.X;
ContextData.Y_abs = ConvertedPos.Y;
......
......@@ -24,6 +24,8 @@
*/
"use strict";
(function(window, document){
// Import
var DownloadType = AscCommon.DownloadType;
var locktype_None = AscCommon.locktype_None;
......@@ -243,7 +245,7 @@ CAscChartProp.prototype.getStyle = function()
CAscChartProp.prototype.putStyle = function(v)
{
return this.ChartProperties && this.ChartProperties.putStyle(v);
}
};
CAscChartProp.prototype.changeType = function(v)
{
......@@ -2520,7 +2522,7 @@ asc_docs_api.prototype.sync_ListType = function(NumPr){
};
asc_docs_api.prototype.sync_TextColor = function(Color){
this.asc_fireCallback("asc_onTextColor", new AscCommon.CColor( Color.r, Color.g, Color.b ));
}
};
asc_docs_api.prototype.sync_TextColor2 = function(unifill)
{
var _color;
......@@ -2553,28 +2555,28 @@ asc_docs_api.prototype.sync_TextColor2 = function(unifill)
color.asc_putB(_color.B);
this.asc_fireCallback("asc_onTextColor", color);
}
}
};
asc_docs_api.prototype.sync_TextHighLight = function(HighLight){
this.asc_fireCallback("asc_onTextHighLight", new AscCommon.CColor( HighLight.r, HighLight.g, HighLight.b ) );
}
};
asc_docs_api.prototype.sync_ParaStyleName = function(Name){
this.asc_fireCallback("asc_onParaStyleName",Name);
}
};
asc_docs_api.prototype.sync_ParaSpacingLine = function(SpacingLine){
this.asc_fireCallback("asc_onParaSpacingLine", new AscCommon.asc_CParagraphSpacing ( SpacingLine ));
}
};
asc_docs_api.prototype.sync_PageBreakCallback = function(isBreak){
this.asc_fireCallback("asc_onPageBreak",isBreak);
}
};
asc_docs_api.prototype.sync_KeepLinesCallback = function(isKeepLines){
this.asc_fireCallback("asc_onKeepLines",isKeepLines);
}
};
asc_docs_api.prototype.sync_ShowParaMarksCallback = function(){
this.asc_fireCallback("asc_onShowParaMarks");
}
};
asc_docs_api.prototype.sync_SpaceBetweenPrgCallback = function(){
this.asc_fireCallback("asc_onSpaceBetweenPrg");
}
};
asc_docs_api.prototype.sync_PrPropCallback = function(prProp){
var _len = this.SelectedObjectsStack.length;
if (_len > 0)
......@@ -2587,7 +2589,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 ) );
}
};
asc_docs_api.prototype.SetDrawImagePlaceParagraph = function(element_id, props)
{
......@@ -5518,6 +5520,7 @@ window["AscDesktopEditor_Save"] = function()
//-------------------------------------------------------------export---------------------------------------------------
window['Asc'] = window['Asc'] || {};
window['AscCommonSlide'] = window['AscCommonSlide'] || {};
window['Asc']['asc_docs_api'] = asc_docs_api;
asc_docs_api.prototype['asc_GetFontThumbnailsPath'] = asc_docs_api.prototype.asc_GetFontThumbnailsPath;
asc_docs_api.prototype['pre_Save'] = asc_docs_api.prototype.pre_Save;
......@@ -5937,6 +5940,7 @@ CHyperlinkProperty.prototype['get_ToolTip'] = CHyperlinkProperty.prototype.get_T
CHyperlinkProperty.prototype['put_ToolTip'] = CHyperlinkProperty.prototype.put_ToolTip;
CHyperlinkProperty.prototype['get_Text'] = CHyperlinkProperty.prototype.get_Text;
CHyperlinkProperty.prototype['put_Text'] = CHyperlinkProperty.prototype.put_Text;
window['AscCommonSlide'].CContextMenuData = CContextMenuData;
CContextMenuData.prototype['get_Type'] = CContextMenuData.prototype.get_Type;
CContextMenuData.prototype['get_X'] = CContextMenuData.prototype.get_X;
CContextMenuData.prototype['get_Y'] = CContextMenuData.prototype.get_Y;
......@@ -6049,3 +6053,4 @@ CTablePropLook.prototype['get_BandHor'] = CTablePropLook.prototype.get_BandHor;
CTablePropLook.prototype['put_BandHor'] = CTablePropLook.prototype.put_BandHor;
CTablePropLook.prototype['get_BandVer'] = CTablePropLook.prototype.get_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