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
6bd183b3
Commit
6bd183b3
authored
Dec 16, 2016
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PathMemory insteat Path
parent
29f2d598
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1285 additions
and
504 deletions
+1285
-504
cell/model/DrawingObjects/Format/ChartSpacePrototype.js
cell/model/DrawingObjects/Format/ChartSpacePrototype.js
+1
-6
common/Charts/ChartsDrawer.js
common/Charts/ChartsDrawer.js
+361
-486
common/Drawings/Format/ChartSpace.js
common/Drawings/Format/ChartSpace.js
+44
-2
common/Drawings/Format/Path.js
common/Drawings/Format/Path.js
+861
-0
common/Drawings/TrackObjects/RotateTracks.js
common/Drawings/TrackObjects/RotateTracks.js
+18
-10
No files found.
cell/model/DrawingObjects/Format/ChartSpacePrototype.js
View file @
6bd183b3
...
...
@@ -226,12 +226,7 @@ CChartSpace.prototype.getParentObjects = function()
return
parents
;
};
CChartSpace
.
prototype
.
recalculateTransform
=
CShape
.
prototype
.
recalculateTransform
;
CChartSpace
.
prototype
.
recalculateChart
=
function
()
{
if
(
this
.
chartObj
==
null
)
this
.
chartObj
=
new
AscFormat
.
CChartsDrawer
();
this
.
chartObj
.
reCalculate
(
this
);
};
CChartSpace
.
prototype
.
canResize
=
CShape
.
prototype
.
canResize
;
CChartSpace
.
prototype
.
canMove
=
CShape
.
prototype
.
canMove
;
CChartSpace
.
prototype
.
canRotate
=
function
()
...
...
common/Charts/ChartsDrawer.js
View file @
6bd183b3
This diff is collapsed.
Click to expand it.
common/Drawings/Format/ChartSpace.js
View file @
6bd183b3
...
...
@@ -31,7 +31,7 @@
*/
"
use strict
"
;
var
GLOBAL_PATH_COUNT
=
0
;
(
/**
* @param {Window} window
...
...
@@ -516,6 +516,37 @@ function checkPointInMap(map, worksheet, row, col)
}
function
CPathMemory
(){
this
.
size
=
1000
;
this
.
ArrPathCommand
=
new
Float64Array
(
this
.
size
);
this
.
curPos
=
-
1
;
this
.
path
=
new
AscFormat
.
Path2
(
this
);
}
CPathMemory
.
prototype
.
AllocPath
=
function
(){
if
(
this
.
curPos
+
1
>=
this
.
ArrPathCommand
.
length
){
var
aNewArray
=
new
Float64Array
((((
3
/
2
)
*
(
this
.
curPos
+
1
))
>>
0
)
+
1
);
for
(
var
i
=
0
;
i
<
this
.
ArrPathCommand
.
length
;
++
i
){
aNewArray
[
i
]
=
this
.
ArrPathCommand
[
i
];
}
this
.
ArrPathCommand
=
aNewArray
;
this
.
path
.
ArrPathCommand
=
aNewArray
;
}
this
.
path
.
startPos
=
++
this
.
curPos
;
this
.
path
.
curLen
=
0
;
this
.
ArrPathCommand
[
this
.
curPos
]
=
0
;
return
this
.
path
;
};
CPathMemory
.
prototype
.
GetPath
=
function
(
index
){
this
.
path
.
startPos
=
index
;
this
.
path
.
curLen
=
0
;
return
this
.
path
;
};
function
CChartSpace
()
{
CChartSpace
.
superclass
.
constructor
.
call
(
this
);
...
...
@@ -539,6 +570,7 @@ function CChartSpace()
this
.
calculatedChart
=
null
;
this
.
pathMemory
=
new
CPathMemory
();
this
.
bbox
=
null
;
...
...
@@ -567,7 +599,16 @@ function CChartSpace()
}
AscCommon
.
extendClass
(
CChartSpace
,
AscFormat
.
CGraphicObjectBase
);
CChartSpace
.
prototype
.
select
=
CShape
.
prototype
.
select
;
CChartSpace
.
prototype
.
AllocPath
=
function
(){
return
this
.
pathMemory
.
AllocPath
().
startPos
;
};
CChartSpace
.
prototype
.
GetPath
=
function
(
index
){
return
this
.
pathMemory
.
GetPath
(
index
);
}
CChartSpace
.
prototype
.
select
=
CShape
.
prototype
.
select
;
CChartSpace
.
prototype
.
checkDrawingBaseCoords
=
CShape
.
prototype
.
checkDrawingBaseCoords
;
CChartSpace
.
prototype
.
setDrawingBaseCoords
=
CShape
.
prototype
.
setDrawingBaseCoords
;
CChartSpace
.
prototype
.
deleteBFromSerialize
=
CShape
.
prototype
.
deleteBFromSerialize
;
...
...
@@ -10380,6 +10421,7 @@ CChartSpace.prototype.addToSetPosition = function(dLbl)
CChartSpace
.
prototype
.
recalculateChart
=
function
()
{
this
.
pathMemory
.
curPos
=
-
1
;
if
(
this
.
chartObj
==
null
)
this
.
chartObj
=
new
AscFormat
.
CChartsDrawer
();
this
.
chartObj
.
reCalculate
(
this
);
...
...
common/Drawings/Format/Path.js
View file @
6bd183b3
This diff is collapsed.
Click to expand it.
common/Drawings/TrackObjects/RotateTracks.js
View file @
6bd183b3
...
...
@@ -633,7 +633,7 @@ function Chart3dAdjustTrack(oChartSpace, numHandle, startX, startY)
var
pxToMM
=
this
.
chartSpace
.
chartObj
.
calcProp
.
pxToMM
;
var
oChSz
=
this
.
chartSizes
;
this
.
centerPoint
=
this
.
processor3D
.
convertAndTurnPoint
((
oChSz
.
startX
+
oChSz
.
w
/
2
)
*
pxToMM
,
(
oChSz
.
startY
+
oChSz
.
h
/
2
)
*
pxToMM
,
this
.
depthPerspective
/
2
);
//
this.centerPoint = this.processor3D.convertAndTurnPoint((oChSz.startX + oChSz.w/2)*pxToMM, (oChSz.startY + oChSz.h/2)*pxToMM, this.depthPerspective/2);
},
this
,
[]);
...
...
@@ -646,13 +646,13 @@ function Chart3dAdjustTrack(oChartSpace, numHandle, startX, startY)
var
dOldAlpha
=
null
;
var
oGraphics
=
overlay
.
Graphics
?
overlay
.
Graphics
:
overlay
;
if
(
AscFormat
.
isRealNumber
(
oGraphics
.
globalAlpha
)
&&
oGraphics
.
put_GlobalAlpha
){
dOldAlpha
=
oGraphics
.
globalAlpha
;
oGraphics
.
put_GlobalAlpha
(
false
,
1
)
;
}
this
.
objectToDraw
.
draw
(
overlay
,
transform
);
this
.
objectToDraw2
.
draw
(
overlay
,
transform
);
if
(
AscFormat
.
isRealNumber
(
dOldAlpha
)
&&
oGraphics
.
put_GlobalAlpha
){
oGraphics
.
put_GlobalAlpha
(
true
,
dOldAlpha
);
var
graphics
=
oGraphics
;
graphics
.
SaveGrState
();
graphics
.
SetIntegerGrid
(
false
);
graphics
.
transform3
(
oChartSpace
.
transform
,
false
);
oChartSpace
.
chartObj
.
draw
(
oChartSpace
,
graphics
);
graphics
.
RestoreGrState
(
);
}
};
...
...
@@ -712,7 +712,7 @@ function Chart3dAdjustTrack(oChartSpace, numHandle, startX, startY)
this
.
getBounds
=
function
()
{
var
boundsChecker
=
new
AscFormat
.
CSlideBoundsChecker
();
this
.
draw
(
boundsChecker
);
//
this.draw(boundsChecker);
var
tr
=
this
.
transform
;
var
arr_p_x
=
[];
var
arr_p_y
=
[];
...
...
@@ -775,6 +775,14 @@ function Chart3dAdjustTrack(oChartSpace, numHandle, startX, startY)
this
.
view3D
.
rotX
=
90
;
}
var
OldView
=
oChartSpace
.
chart
.
view3D
;
oChartSpace
.
chart
.
view3D
=
this
.
view3D
;
oChartSpace
.
recalcInfo
.
recalculateChart
=
true
;
oChartSpace
.
recalculate
();
oChartSpace
.
chart
.
view3D
=
OldView
;
return
;
this
.
processor3D
.
angleOx
=
this
.
view3D
&&
this
.
view3D
.
rotX
?
(
-
this
.
view3D
.
rotX
/
360
)
*
(
Math
.
PI
*
2
)
:
0
;
this
.
processor3D
.
angleOy
=
this
.
view3D
&&
this
.
view3D
.
rotY
?
(
-
this
.
view3D
.
rotY
/
360
)
*
(
Math
.
PI
*
2
)
:
0
;
this
.
processor3D
.
angleOz
=
0
;
...
...
@@ -783,7 +791,7 @@ function Chart3dAdjustTrack(oChartSpace, numHandle, startX, startY)
// this.processor3D.calaculate3DProperties();
//this.processor3D.view3D = oChartSpace.chart.view3D;
this
.
calculateGeometry
();
//
this.calculateGeometry();
};
this
.
trackEnd
=
function
()
...
...
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