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
c77194bb
Commit
c77194bb
authored
Apr 22, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common/Charts/ChartsDrawer to function-closure
parent
af852eb9
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
54 additions
and
41 deletions
+54
-41
build/configs/webexcel.json
build/configs/webexcel.json
+1
-1
build/configs/webpowerpoint.json
build/configs/webpowerpoint.json
+1
-1
build/configs/webword.json
build/configs/webword.json
+1
-1
cell/model/DrawingObjects/Format/ChartSpacePrototype.js
cell/model/DrawingObjects/Format/ChartSpacePrototype.js
+1
-1
common/Charts/3DTransformation.js
common/Charts/3DTransformation.js
+3
-0
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+38
-29
common/Charts/DrawingObjects.js
common/Charts/DrawingObjects.js
+1
-0
common/Drawings/Format/ChartSpace.js
common/Drawings/Format/ChartSpace.js
+6
-6
slide/Editor/Format/ChartSpacePrototype.js
slide/Editor/Format/ChartSpacePrototype.js
+1
-1
word/Editor/GraphicObjects/Format/ChartSpacePrototype.js
word/Editor/GraphicObjects/Format/ChartSpacePrototype.js
+1
-1
No files found.
build/configs/webexcel.json
View file @
c77194bb
...
...
@@ -27,6 +27,7 @@
"../common/Charts/charts.js"
,
"../common/Charts/DrawingArea.js"
,
"../common/Charts/DrawingObjects.js"
,
"../common/Charts/ChartsDrawer.js"
,
"../common/scroll.js"
,
"../cell/view/iscroll.js"
,
...
...
@@ -34,7 +35,6 @@
"../common/wordcopypaste.js"
,
"../cell/apiDefines.js"
,
"../common/Charts/ChartsDrawer.js"
,
"../common/Charts/3DTransformation.js"
,
"../common/FontsFreeType/font_engine.js"
,
"../common/FontsFreeType/FontFile.js"
,
...
...
build/configs/webpowerpoint.json
View file @
c77194bb
...
...
@@ -27,6 +27,7 @@
"../common/Charts/charts.js"
,
"../common/Charts/DrawingArea.js"
,
"../common/Charts/DrawingObjects.js"
,
"../common/Charts/ChartsDrawer.js"
,
"../common/scroll.js"
,
...
...
@@ -42,7 +43,6 @@
"../slide/Drawing/ThemeLoader.js"
,
"../common/SerializeCommonWordExcel.js"
,
"../common/SerializeChart.js"
,
"../common/Charts/ChartsDrawer.js"
,
"../common/Charts/3DTransformation.js"
,
"../word/Editor/Serialize2.js"
,
"../word/Editor/Styles.js"
,
...
...
build/configs/webword.json
View file @
c77194bb
...
...
@@ -30,6 +30,7 @@
"../common/Charts/charts.js"
,
"../common/Charts/DrawingArea.js"
,
"../common/Charts/DrawingObjects.js"
,
"../common/Charts/ChartsDrawer.js"
,
"../common/scroll.js"
,
"../common/Scrolls/iscroll.js"
,
...
...
@@ -48,7 +49,6 @@
"../word/Drawing/Externals.js"
,
"../common/GlobalLoaders.js"
,
"../word/Drawing/translations.js"
,
"../common/Charts/ChartsDrawer.js"
,
"../common/Charts/3DTransformation.js"
,
"../common/Drawings/TrackObjects/AdjustmentTracks.js"
,
"../common/Drawings/TrackObjects/MoveTracks.js"
,
...
...
cell/model/DrawingObjects/Format/ChartSpacePrototype.js
View file @
c77194bb
...
...
@@ -220,7 +220,7 @@ CChartSpace.prototype.recalculateTransform = CShape.prototype.recalculateTransfo
CChartSpace
.
prototype
.
recalculateChart
=
function
()
{
if
(
this
.
chartObj
==
null
)
this
.
chartObj
=
new
CChartsDrawer
();
this
.
chartObj
=
new
AscFormat
.
CChartsDrawer
();
this
.
chartObj
.
reCalculate
(
this
);
};
CChartSpace
.
prototype
.
canResize
=
CShape
.
prototype
.
canResize
;
...
...
common/Charts/3DTransformation.js
View file @
c77194bb
...
...
@@ -27,6 +27,9 @@
// Import
var
ORIENTATION_MIN_MAX
=
AscFormat
.
ORIENTATION_MIN_MAX
;
var
globalBasePercent
=
100
;
var
global3DPersperctive
=
30
;
// ToDo а нужна ли она в ChartsDrawer ?
/** @constructor */
function
Processor3D
(
width
,
height
,
left
,
right
,
bottom
,
top
,
chartSpace
,
chartsDrawer
)
{
this
.
widthCanvas
=
width
;
...
...
common/Charts/ChartsDrawer.js
View file @
c77194bb
...
...
@@ -24,6 +24,13 @@
*/
"
use strict
"
;
(
/**
* @param {Window} window
* @param {undefined} undefined
*/
function
(
window
,
undefined
)
{
// Import
var
cToDeg
=
AscFormat
.
cToDeg
;
var
Path
=
AscFormat
.
Path
;
...
...
@@ -32,8 +39,6 @@ var ORIENTATION_MIN_MAX = AscFormat.ORIENTATION_MIN_MAX;
var
c_oAscTickMark
=
Asc
.
c_oAscTickMark
;
var
c_oAscChartDataLabelsPos
=
Asc
.
c_oAscChartDataLabelsPos
;
var
global3DPersperctive
=
30
;
var
globalBasePercent
=
100
;
var
globalGapDepth
=
150
;
var
isTurnOn3DCharts
=
true
;
var
standartMarginForCharts
=
13
;
...
...
@@ -2635,7 +2640,7 @@ CChartsDrawer.prototype =
//*****BAR CHART*****
/** @constructor */
function
drawBarChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -3244,11 +3249,11 @@ drawBarChart.prototype =
return
{
paths
:
paths
,
x
:
point1
.
x
,
y
:
point1
.
y
,
zIndex
:
point1
.
z
,
sortPaths
:
sortPaths
};
}
}
}
;
//*****LINE CHART*****
/** @constructor */
function
drawLineChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -3779,7 +3784,7 @@ drawLineChart.prototype =
//*****AREA CHART*****
/** @constructor */
function
drawAreaChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -5853,7 +5858,7 @@ drawAreaChart.prototype =
//*****HBAR CHART*****
/** @constructor */
function
drawHBarChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -6554,7 +6559,7 @@ drawHBarChart.prototype =
//*****PIE CHART*****
/** @constructor */
function
drawPieChart
()
{
this
.
tempAngle
=
null
;
...
...
@@ -7476,7 +7481,7 @@ drawPieChart.prototype =
};
//*****Doughnut CHART*****
/** @constructor */
function
drawDoughnutChart
()
{
this
.
tempAngle
=
null
;
...
...
@@ -7702,7 +7707,7 @@ drawDoughnutChart.prototype =
};
//*****RADAR CHART*****
/** @constructor */
function
drawRadarChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -8064,7 +8069,7 @@ drawRadarChart.prototype =
//*****Scatter CHART*****
/** @constructor */
function
drawScatterChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -8536,7 +8541,7 @@ drawScatterChart.prototype =
};
//*****Stock CHART*****
/** @constructor */
function
drawStockChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -8831,7 +8836,7 @@ drawStockChart.prototype =
}
};
/** @constructor */
function
drawBubbleChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -9125,7 +9130,7 @@ drawBubbleChart.prototype =
//*****GRID*****
/** @constructor */
function
gridChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -9616,9 +9621,9 @@ gridChart.prototype =
}
}
};
//*****Category axis*****
/** @constructor */
function
catAxisChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -9971,7 +9976,7 @@ catAxisChart.prototype =
};
//*****value axis*****
/** @constructor */
function
valAxisChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -10239,7 +10244,7 @@ valAxisChart.prototype =
}
};
/** @constructor */
function
serAxisChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -10428,6 +10433,7 @@ serAxisChart.prototype =
}
};
/** @constructor */
function
floor3DChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -10519,7 +10525,7 @@ floor3DChart.prototype =
};
/** @constructor */
function
sideWall3DChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -10610,7 +10616,7 @@ sideWall3DChart.prototype =
}
};
/** @constructor */
function
backWall3DChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -10702,7 +10708,7 @@ backWall3DChart.prototype =
};
//*****all area of chart*****
/** @constructor */
function
allAreaChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -10767,8 +10773,8 @@ allAreaChart.prototype =
this
.
cChartDrawer
.
drawPath
(
this
.
paths
,
pen
,
brush
);
}
};
//*****Area of chart*****
/** @constructor */
function
areaChart
()
{
this
.
chartProp
=
null
;
...
...
@@ -10901,8 +10907,8 @@ areaChart.prototype =
this
.
cChartDrawer
.
drawPath
(
this
.
paths
,
pen
,
brush
);
}
};
//****another functions and classes***
/** @constructor */
function
CGeometry2
()
{
this
.
pathLst
=
[];
...
...
@@ -10961,7 +10967,7 @@ CGeometry2.prototype =
}
};
/** @constructor */
function
CColorObj
(
pen
,
brush
,
geometry
)
{
this
.
pen
=
pen
;
...
...
@@ -11089,9 +11095,9 @@ TEST3D2.prototype =
var
point6
=
new
Point3D
(
left
+
widthChart
,
heightChart
+
top
,
depthChart
,
this
.
cChartDrawer
);
var
point7
=
new
Point3D
(
left
+
widthChart
,
top
,
depthChart
,
this
.
cChartDrawer
);
var
point8
=
new
Point3D
(
left
+
widthChart
,
top
,
0
,
this
.
cChartDrawer
);
// ToDo а нужна ли global3DPersperctive в ChartsDrawer ?
var
perspective
=
this
.
cChartSpace
.
chart
.
view3D
&&
this
.
cChartSpace
.
chart
.
view3D
.
perspective
?
this
.
cChartSpace
.
chart
.
view3D
.
perspective
:
global3DPersperctive
;
var
alpha
=
perspective
/
2
;
...
...
@@ -11493,3 +11499,6 @@ TEST3D.prototype =
}
};
window
[
'
AscFormat
'
]
=
window
[
'
AscFormat
'
]
||
{};
window
[
'
AscFormat
'
].
CChartsDrawer
=
CChartsDrawer
;
})(
window
);
common/Charts/DrawingObjects.js
View file @
c77194bb
...
...
@@ -3909,6 +3909,7 @@ function CoordsManager(ws) {
//--------------------------------------------------------export----------------------------------------------------
var
prot
;
window
[
'
AscFormat
'
]
=
window
[
'
AscFormat
'
]
||
{};
window
[
'
Asc
'
]
=
window
[
'
Asc
'
]
||
{};
window
[
'
AscFormat
'
].
isObject
=
isObject
;
window
[
'
AscFormat
'
].
CCellObjectInfo
=
CCellObjectInfo
;
...
...
common/Drawings/Format/ChartSpace.js
View file @
c77194bb
...
...
@@ -2733,7 +2733,7 @@ CChartSpace.prototype =
{
if
(
!
this
.
chartObj
)
{
this
.
chartObj
=
new
CChartsDrawer
();
this
.
chartObj
=
new
AscFormat
.
CChartsDrawer
();
}
return
this
.
chartObj
.
calculatePositionLabelsCatAxFromAngle
(
this
);
},
...
...
@@ -7243,7 +7243,7 @@ CChartSpace.prototype =
getChartSizes
:
function
()
{
if
(
!
this
.
chartObj
)
this
.
chartObj
=
new
CChartsDrawer
();
this
.
chartObj
=
new
AscFormat
.
CChartsDrawer
();
return
this
.
chartObj
.
calculateSizePlotArea
(
this
);
},
...
...
@@ -7404,7 +7404,7 @@ CChartSpace.prototype =
{
if
(
!
this
.
chartObj
)
{
this
.
chartObj
=
new
CChartsDrawer
()
this
.
chartObj
=
new
AscFormat
.
CChartsDrawer
()
}
this
.
chartObj
.
preCalculateData
(
this
);
return
[].
concat
(
this
.
chartObj
.
calcProp
.
xScale
);
...
...
@@ -7415,7 +7415,7 @@ CChartSpace.prototype =
{
if
(
!
this
.
chartObj
)
{
this
.
chartObj
=
new
CChartsDrawer
()
this
.
chartObj
=
new
AscFormat
.
CChartsDrawer
()
}
this
.
chartObj
.
preCalculateData
(
this
);
return
[].
concat
(
this
.
chartObj
.
calcProp
.
scale
);
...
...
@@ -7425,7 +7425,7 @@ CChartSpace.prototype =
{
if
(
!
this
.
chartObj
)
{
this
.
chartObj
=
new
CChartsDrawer
()
this
.
chartObj
=
new
AscFormat
.
CChartsDrawer
()
}
this
.
chartObj
.
preCalculateData
(
this
);
return
this
.
chartObj
.
calcProp
;
...
...
@@ -8533,7 +8533,7 @@ CChartSpace.prototype =
recalculateChart
:
function
()
{
if
(
this
.
chartObj
==
null
)
this
.
chartObj
=
new
CChartsDrawer
();
this
.
chartObj
=
new
AscFormat
.
CChartsDrawer
();
this
.
chartObj
.
reCalculate
(
this
);
},
...
...
slide/Editor/Format/ChartSpacePrototype.js
View file @
c77194bb
...
...
@@ -317,7 +317,7 @@ CChartSpace.prototype.recalculateTransform = CShape.prototype.recalculateTransfo
CChartSpace
.
prototype
.
recalculateChart
=
function
()
{
if
(
this
.
chartObj
==
null
)
this
.
chartObj
=
new
CChartsDrawer
();
this
.
chartObj
=
new
AscFormat
.
CChartsDrawer
();
this
.
chartObj
.
reCalculate
(
this
);
};
CChartSpace
.
prototype
.
canResize
=
CShape
.
prototype
.
canResize
;
...
...
word/Editor/GraphicObjects/Format/ChartSpacePrototype.js
View file @
c77194bb
...
...
@@ -220,7 +220,7 @@ CChartSpace.prototype.recalculateTransform = CShape.prototype.recalculateTransfo
CChartSpace
.
prototype
.
recalculateChart
=
function
()
{
if
(
this
.
chartObj
==
null
)
this
.
chartObj
=
new
CChartsDrawer
();
this
.
chartObj
=
new
AscFormat
.
CChartsDrawer
();
this
.
chartObj
.
reCalculate
(
this
);
};
CChartSpace
.
prototype
.
canResize
=
CShape
.
prototype
.
canResize
;
...
...
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