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

slide/api to function closure

parent 16a0bcb3
......@@ -3217,7 +3217,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;
......@@ -3306,7 +3306,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;
......@@ -3335,7 +3335,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;
......@@ -4831,7 +4831,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;
}
......@@ -4845,7 +4845,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;
}
......
......@@ -2708,7 +2708,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 }) );
}
}
......@@ -2915,7 +2915,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;
......
"use strict";
(function(window, document){
// Import
var DownloadType = AscCommon.DownloadType;
var locktype_None = AscCommon.locktype_None;
......@@ -219,7 +221,7 @@ CAscChartProp.prototype.getStyle = function()
CAscChartProp.prototype.putStyle = function(v)
{
return this.ChartProperties && this.ChartProperties.putStyle(v);
}
};
CAscChartProp.prototype.changeType = function(v)
{
......@@ -2496,7 +2498,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;
......@@ -2529,28 +2531,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)
......@@ -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 ) );
}
};
asc_docs_api.prototype.SetDrawImagePlaceParagraph = function(element_id, props)
{
......@@ -5494,6 +5496,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;
......@@ -5913,6 +5916,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;
......@@ -6025,3 +6029,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