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
1e831653
Commit
1e831653
authored
Feb 10, 2017
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Bug 31843
parent
d7532009
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
23 deletions
+30
-23
common/Drawings/Format/ChartFormat.js
common/Drawings/Format/ChartFormat.js
+8
-1
common/Drawings/Format/ChartSpace.js
common/Drawings/Format/ChartSpace.js
+22
-22
No files found.
common/Drawings/Format/ChartFormat.js
View file @
1e831653
...
@@ -13341,6 +13341,13 @@ CView3d.prototype =
...
@@ -13341,6 +13341,13 @@ CView3d.prototype =
},
},
getRAngAx
:
function
(){
getRAngAx
:
function
(){
if
(
AscFormat
.
isRealBool
(
this
.
rAngAx
)){
return
this
.
rAngAx
;
}
if
(
AscFormat
.
isRealNumber
(
this
.
perspective
)){
return
false
;
}
return
this
.
rAngAx
!==
false
;
return
this
.
rAngAx
!==
false
;
},
},
...
@@ -13353,7 +13360,7 @@ CView3d.prototype =
...
@@ -13353,7 +13360,7 @@ CView3d.prototype =
{
{
History
.
Add
(
new
CChangesDrawingsLong
(
this
,
AscDFH
.
historyitem_View3d_SetRotY
,
this
.
rotY
,
pr
));
History
.
Add
(
new
CChangesDrawingsLong
(
this
,
AscDFH
.
historyitem_View3d_SetRotY
,
this
.
rotY
,
pr
));
this
.
rotY
=
pr
;
this
.
rotY
=
pr
;
}
}
};
};
function
CreateTextBodyFromString
(
str
,
drawingDocument
,
parent
)
function
CreateTextBodyFromString
(
str
,
drawingDocument
,
parent
)
...
...
common/Drawings/Format/ChartSpace.js
View file @
1e831653
...
@@ -3861,12 +3861,12 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -3861,12 +3861,12 @@ CChartSpace.prototype.recalculateAxis = function()
y_ax
.
labels
.
x
=
rect
.
x
+
hor_interval_width
*
(
arr_x_val
[
arr_x_val
.
length
-
1
]
-
arr_x_val
[
0
]);
y_ax
.
labels
.
x
=
rect
.
x
+
hor_interval_width
*
(
arr_x_val
[
arr_x_val
.
length
-
1
]
-
arr_x_val
[
0
]);
y_ax
.
posX
=
rect
.
x
+
(
crosses
-
arr_x_val
[
0
])
*
hor_interval_width
;
y_ax
.
posX
=
rect
.
x
+
(
crosses
-
arr_x_val
[
0
])
*
hor_interval_width
;
if
(
y_ax
.
labels
.
x
<
0
){
if
(
y_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
){
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
&&
!
bNeedReflect
){
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
...
@@ -3912,12 +3912,12 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -3912,12 +3912,12 @@ CChartSpace.prototype.recalculateAxis = function()
y_ax
.
posX
=
rect
.
x
+
(
crosses
-
arr_x_val
[
0
])
*
hor_interval_width
;
y_ax
.
posX
=
rect
.
x
+
(
crosses
-
arr_x_val
[
0
])
*
hor_interval_width
;
if
(
y_ax
.
labels
.
x
<
0
){
if
(
y_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
){
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
&&
!
bNeedReflect
){
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
...
@@ -3988,12 +3988,12 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -3988,12 +3988,12 @@ CChartSpace.prototype.recalculateAxis = function()
arr_x_points
[
i
]
=
rect
.
x
+
hor_interval_width
*
(
arr_x_val
[
i
]
-
arr_x_val
[
0
]);
arr_x_points
[
i
]
=
rect
.
x
+
hor_interval_width
*
(
arr_x_val
[
i
]
-
arr_x_val
[
0
]);
}
}
if
(
y_ax
.
labels
.
x
<
0
){
if
(
y_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
){
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
&&
!
bNeedReflect
){
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
...
@@ -4031,12 +4031,12 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -4031,12 +4031,12 @@ CChartSpace.prototype.recalculateAxis = function()
}
}
y_ax
.
labels
.
x
=
y_ax
.
posX
-
y_ax
.
labels
.
extX
;
y_ax
.
labels
.
x
=
y_ax
.
posX
-
y_ax
.
labels
.
extX
;
if
(
y_ax
.
labels
.
x
<
0
){
if
(
y_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
){
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
&&
!
bNeedReflect
){
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
...
@@ -4089,12 +4089,12 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -4089,12 +4089,12 @@ CChartSpace.prototype.recalculateAxis = function()
}
}
y_ax
.
labels
.
x
=
y_ax
.
posX
-
(
arr_x_val
[
arr_x_val
.
length
-
1
]
-
crosses
)
*
hor_interval_width
-
y_ax
.
labels
.
extX
;
y_ax
.
labels
.
x
=
y_ax
.
posX
-
(
arr_x_val
[
arr_x_val
.
length
-
1
]
-
crosses
)
*
hor_interval_width
-
y_ax
.
labels
.
extX
;
if
(
y_ax
.
labels
.
x
<
0
){
if
(
y_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
){
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
&&
!
bNeedReflect
){
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
...
@@ -4144,12 +4144,12 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -4144,12 +4144,12 @@ CChartSpace.prototype.recalculateAxis = function()
}
}
y_ax
.
labels
.
x
=
rect
.
x
+
rect
.
w
;
y_ax
.
labels
.
x
=
rect
.
x
+
rect
.
w
;
if
(
y_ax
.
labels
.
x
<
0
){
if
(
y_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
){
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
&&
!
bNeedReflect
){
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
...
@@ -4211,12 +4211,12 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -4211,12 +4211,12 @@ CChartSpace.prototype.recalculateAxis = function()
if
(
y_ax
.
labels
.
x
<
0
){
if
(
y_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
){
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
&&
!
bNeedReflect
){
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
...
@@ -4248,12 +4248,12 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -4248,12 +4248,12 @@ CChartSpace.prototype.recalculateAxis = function()
if
(
y_ax
.
labels
.
x
<
0
){
if
(
y_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
x
-=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
rect
.
w
+=
y_ax
.
labels
.
x
;
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
){
if
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
>
this
.
extX
&&
!
bNeedReflect
){
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
rect
.
w
-=
(
y_ax
.
labels
.
x
+
y_ax
.
labels
.
extX
-
this
.
extX
);
bCorrectedLayoutRect
=
true
;
bCorrectedLayoutRect
=
true
;
}
}
...
@@ -5180,7 +5180,7 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -5180,7 +5180,7 @@ CChartSpace.prototype.recalculateAxis = function()
}
}
else
{
else
{
val_ax
.
labels
.
x
=
rect
.
x
+
rect
.
w
;
val_ax
.
labels
.
x
=
rect
.
x
+
rect
.
w
;
if
(
val_ax
.
labels
.
x
<
0
){
if
(
val_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
val_ax
.
labels
.
x
;
rect
.
x
-=
val_ax
.
labels
.
x
;
rect
.
w
+=
val_ax
.
labels
.
x
;
rect
.
w
+=
val_ax
.
labels
.
x
;
val_ax
.
labels
.
x
=
0
;
val_ax
.
labels
.
x
=
0
;
...
@@ -5241,7 +5241,7 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -5241,7 +5241,7 @@ CChartSpace.prototype.recalculateAxis = function()
}
}
else
{
else
{
val_ax
.
labels
.
x
=
rect
.
x
+
left_points_width
-
val_ax
.
labels
.
extX
;
val_ax
.
labels
.
x
=
rect
.
x
+
left_points_width
-
val_ax
.
labels
.
extX
;
if
(
val_ax
.
labels
.
x
<
0
){
if
(
val_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
val_ax
.
labels
.
x
;
rect
.
x
-=
val_ax
.
labels
.
x
;
rect
.
w
+=
val_ax
.
labels
.
x
;
rect
.
w
+=
val_ax
.
labels
.
x
;
val_ax
.
labels
.
x
=
0
;
val_ax
.
labels
.
x
=
0
;
...
@@ -5383,7 +5383,7 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -5383,7 +5383,7 @@ CChartSpace.prototype.recalculateAxis = function()
}
}
else
{
else
{
val_ax
.
labels
.
x
=
rect
.
x
-
val_ax
.
labels
.
extX
;
val_ax
.
labels
.
x
=
rect
.
x
-
val_ax
.
labels
.
extX
;
if
(
val_ax
.
labels
.
x
<
0
){
if
(
val_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
val_ax
.
labels
.
x
;
rect
.
x
-=
val_ax
.
labels
.
x
;
rect
.
w
+=
val_ax
.
labels
.
x
;
rect
.
w
+=
val_ax
.
labels
.
x
;
val_ax
.
labels
.
x
=
0
;
val_ax
.
labels
.
x
=
0
;
...
@@ -5440,7 +5440,7 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -5440,7 +5440,7 @@ CChartSpace.prototype.recalculateAxis = function()
else
else
{
{
val_ax
.
labels
.
x
=
rect
.
x
+
rect
.
w
-
right_point_width
;
val_ax
.
labels
.
x
=
rect
.
x
+
rect
.
w
-
right_point_width
;
if
(
val_ax
.
labels
.
x
<
0
){
if
(
val_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
val_ax
.
labels
.
x
;
rect
.
x
-=
val_ax
.
labels
.
x
;
rect
.
w
+=
val_ax
.
labels
.
x
;
rect
.
w
+=
val_ax
.
labels
.
x
;
val_ax
.
labels
.
x
=
0
;
val_ax
.
labels
.
x
=
0
;
...
@@ -5503,7 +5503,7 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -5503,7 +5503,7 @@ CChartSpace.prototype.recalculateAxis = function()
else
{
else
{
val_ax
.
labels
.
x
=
rect
.
x
+
rect
.
w
;
val_ax
.
labels
.
x
=
rect
.
x
+
rect
.
w
;
if
(
val_ax
.
labels
.
x
<
0
){
if
(
val_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
val_ax
.
labels
.
x
;
rect
.
x
-=
val_ax
.
labels
.
x
;
rect
.
w
+=
val_ax
.
labels
.
x
;
rect
.
w
+=
val_ax
.
labels
.
x
;
val_ax
.
labels
.
x
=
0
;
val_ax
.
labels
.
x
=
0
;
...
@@ -5565,7 +5565,7 @@ CChartSpace.prototype.recalculateAxis = function()
...
@@ -5565,7 +5565,7 @@ CChartSpace.prototype.recalculateAxis = function()
}
}
else
{
else
{
val_ax
.
labels
.
x
=
rect
.
x
-
val_ax
.
labels
.
extX
;
val_ax
.
labels
.
x
=
rect
.
x
-
val_ax
.
labels
.
extX
;
if
(
val_ax
.
labels
.
x
<
0
){
if
(
val_ax
.
labels
.
x
<
0
&&
!
bNeedReflect
){
rect
.
x
-=
val_ax
.
labels
.
x
;
rect
.
x
-=
val_ax
.
labels
.
x
;
rect
.
w
+=
val_ax
.
labels
.
x
;
rect
.
w
+=
val_ax
.
labels
.
x
;
val_ax
.
labels
.
x
=
0
;
val_ax
.
labels
.
x
=
0
;
...
...
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