Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
1c81a2c1
Commit
1c81a2c1
authored
May 12, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slide/api to function closure
parent
16a0bcb3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
18 deletions
+23
-18
slide/Drawing/DrawingDocument.js
slide/Drawing/DrawingDocument.js
+5
-5
slide/Editor/Format/Presentation.js
slide/Editor/Format/Presentation.js
+2
-2
slide/api.js
slide/api.js
+16
-11
No files found.
slide/Drawing/DrawingDocument.js
View file @
1c81a2c1
...
@@ -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
;
}
}
...
...
slide/Editor/Format/Presentation.js
View file @
1c81a2c1
...
@@ -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
;
...
...
slide/api.js
View file @
1c81a2c1
"
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
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment