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
2f50c4e1
Commit
2f50c4e1
authored
Apr 20, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common/charts/charts to function-closure
parent
2297c498
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
42 additions
and
25 deletions
+42
-25
build/configs/webexcel.json
build/configs/webexcel.json
+3
-1
build/configs/webpowerpoint.json
build/configs/webpowerpoint.json
+3
-1
build/configs/webword.json
build/configs/webword.json
+3
-1
cell/native/native.js
cell/native/native.js
+3
-3
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+13
-0
common/Charts/charts.js
common/Charts/charts.js
+12
-14
common/Native/Wrappers/api.js
common/Native/Wrappers/api.js
+3
-3
common/apiBase.js
common/apiBase.js
+2
-2
No files found.
build/configs/webexcel.json
View file @
2f50c4e1
...
...
@@ -13,8 +13,10 @@
"../common/NumFormat.js"
,
"../common/wordcopypaste.js"
,
"../common/Charts/charts.js"
,
"../cell/apiDefines.js"
,
"../common/Charts/charts.js"
,
"../common/Charts/DrawingArea.js"
,
"../common/Charts/DrawingObjects.js"
,
"../common/Charts/ChartsDrawer.js"
,
...
...
build/configs/webpowerpoint.json
View file @
2f50c4e1
...
...
@@ -13,6 +13,8 @@
"../common/NumFormat.js"
,
"../common/wordcopypaste.js"
,
"../common/Charts/charts.js"
,
"../slide/apiDefines.js"
,
"../common/FontsFreeType/font_engine.js"
,
...
...
@@ -25,7 +27,7 @@
"../common/Charts/DrawingObjects.js"
,
"../common/SerializeCommonWordExcel.js"
,
"../common/SerializeChart.js"
,
"../common/Charts/charts.js"
,
"../common/Charts/ChartsDrawer.js"
,
"../common/Charts/3DTransformation.js"
,
"../common/Charts/DrawingArea.js"
,
...
...
build/configs/webword.json
View file @
2f50c4e1
...
...
@@ -16,6 +16,8 @@
"../common/NumFormat.js"
,
"../common/wordcopypaste.js"
,
"../common/Charts/charts.js"
,
"../word/apiDefines.js"
,
"../common/Shapes/Serialize.js"
,
...
...
@@ -31,7 +33,7 @@
"../word/Drawing/Externals.js"
,
"../common/GlobalLoaders.js"
,
"../word/Drawing/translations.js"
,
"../common/Charts/charts.js"
,
"../common/Charts/ChartsDrawer.js"
,
"../common/Charts/3DTransformation.js"
,
"../common/Charts/DrawingArea.js"
,
...
...
cell/native/native.js
View file @
2f50c4e1
...
...
@@ -5657,8 +5657,8 @@ function OfflineEditor () {
};
// chat styles
ChartPreviewManager
.
prototype
.
clearPreviews
=
function
()
{
window
[
"
native
"
][
"
ClearCacheChartStyles
"
]();};
ChartPreviewManager
.
prototype
.
createChartPreview
=
function
(
_graphics
,
type
,
styleIndex
)
{
AscCommon
.
ChartPreviewManager
.
prototype
.
clearPreviews
=
function
()
{
window
[
"
native
"
][
"
ClearCacheChartStyles
"
]();};
AscCommon
.
ChartPreviewManager
.
prototype
.
createChartPreview
=
function
(
_graphics
,
type
,
styleIndex
)
{
return
ExecuteNoHistory
(
function
(){
if
(
!
this
.
chartsByTypes
[
type
])
this
.
chartsByTypes
[
type
]
=
this
.
getChartByType
(
type
);
...
...
@@ -5707,7 +5707,7 @@ function OfflineEditor () {
},
this
,
[]);
};
ChartPreviewManager
.
prototype
.
getChartPreviews
=
function
(
chartType
)
{
AscCommon
.
ChartPreviewManager
.
prototype
.
getChartPreviews
=
function
(
chartType
)
{
if
(
isRealNumber
(
chartType
))
{
...
...
common/Charts/ChartsDrawer.js
View file @
2f50c4e1
...
...
@@ -30,6 +30,19 @@ var globalGapDepth = 150;
var
isTurnOn3DCharts
=
true
;
var
standartMarginForCharts
=
13
;
function
arrReverse
(
arr
)
{
if
(
!
arr
||
!
arr
.
length
)
return
;
var
newarr
=
[];
for
(
var
i
=
0
;
i
<
arr
[
0
].
length
;
++
i
)
{
newarr
[
i
]
=
[];
for
(
var
j
=
0
;
j
<
arr
.
length
;
++
j
)
{
newarr
[
i
][
j
]
=
arr
[
j
][
i
];
}
}
return
newarr
;
}
//*****MAIN*****
function
CChartsDrawer
()
{
...
...
common/Charts/charts.js
View file @
2f50c4e1
...
...
@@ -24,6 +24,12 @@
*/
"
use strict
"
;
(
/**
* @param {Window} window
* @param {undefined} undefined
*/
function
(
window
,
undefined
)
{
// Import
var
c_oAscChartTypeSettings
=
Asc
.
c_oAscChartTypeSettings
;
var
c_oAscTickMark
=
Asc
.
c_oAscTickMark
;
...
...
@@ -485,19 +491,6 @@ ChartPreviewManager.prototype.getChartPreviews = function(chartType) {
return
null
;
};
function
arrReverse
(
arr
)
{
if
(
!
arr
||
!
arr
.
length
)
return
;
var
newarr
=
[];
for
(
var
i
=
0
;
i
<
arr
[
0
].
length
;
++
i
)
{
newarr
[
i
]
=
[];
for
(
var
j
=
0
;
j
<
arr
.
length
;
++
j
)
{
newarr
[
i
][
j
]
=
arr
[
j
][
i
];
}
}
return
newarr
;
}
function
CreateAscColorByIndex
(
nIndex
)
{
var
oColor
=
new
Asc
.
asc_CColor
();
...
...
@@ -657,7 +650,7 @@ TextArtPreviewManager.prototype.initStyles = function()
oTextPr
.
TextOutline
=
CreateNoFillLine
();
this
.
aStylesByIndex
[
11
]
=
oTextPr
;
this
.
aStylesByIndexToApply
[
11
]
=
oTextPr
;
}
}
;
TextArtPreviewManager
.
prototype
.
getStylesToApply
=
function
()
{
...
...
@@ -1044,3 +1037,8 @@ function GenerateWordArtPrewiewCode()
return
oRetString
;
}
//----------------------------------------------------------export----------------------------------------------------
window
[
'
AscCommon
'
]
=
window
[
'
AscCommon
'
]
||
{};
window
[
'
AscCommon
'
].
ChartPreviewManager
=
ChartPreviewManager
;
window
[
'
AscCommon
'
].
TextArtPreviewManager
=
TextArtPreviewManager
;
})(
window
);
common/Native/Wrappers/api.js
View file @
2f50c4e1
...
...
@@ -5519,11 +5519,11 @@ window["NativeCorrectImageUrlOnCopy"] = function(url)
};
// chat styles
ChartPreviewManager
.
prototype
.
clearPreviews
=
function
()
AscCommon
.
ChartPreviewManager
.
prototype
.
clearPreviews
=
function
()
{
window
[
"
native
"
][
"
DD_ClearCacheChartStyles
"
]();
};
ChartPreviewManager
.
prototype
.
createChartPreview
=
function
(
_graphics
,
type
,
styleIndex
)
AscCommon
.
ChartPreviewManager
.
prototype
.
createChartPreview
=
function
(
_graphics
,
type
,
styleIndex
)
{
return
ExecuteNoHistory
(
function
(){
if
(
!
this
.
chartsByTypes
[
type
])
...
...
@@ -5570,7 +5570,7 @@ ChartPreviewManager.prototype.createChartPreview = function(_graphics, type, sty
};
ChartPreviewManager
.
prototype
.
getChartPreviews
=
function
(
chartType
)
AscCommon
.
ChartPreviewManager
.
prototype
.
getChartPreviews
=
function
(
chartType
)
{
if
(
isRealNumber
(
chartType
))
{
...
...
common/apiBase.js
View file @
2f50c4e1
...
...
@@ -91,8 +91,8 @@ function baseEditorsApi(name) {
// Chart
this
.
chartTranslate
=
new
asc_CChartTranslate
();
this
.
textArtTranslate
=
new
Asc
.
asc_TextArtTranslate
();
this
.
chartPreviewManager
=
new
ChartPreviewManager
();
this
.
textArtPreviewManager
=
new
TextArtPreviewManager
();
this
.
chartPreviewManager
=
new
AscCommon
.
ChartPreviewManager
();
this
.
textArtPreviewManager
=
new
AscCommon
.
TextArtPreviewManager
();
// Режим вставки диаграмм в редакторе документов
this
.
isChartEditor
=
false
;
this
.
isOpenedChartFrame
=
false
;
...
...
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