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
a6075610
Commit
a6075610
authored
Feb 17, 2017
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checking chart properties before applying
parent
77e56f2e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
215 additions
and
0 deletions
+215
-0
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+4
-0
common/apiCommon.js
common/apiCommon.js
+211
-0
No files found.
common/Drawings/CommonController.js
View file @
a6075610
...
@@ -2884,6 +2884,10 @@ DrawingObjectsController.prototype =
...
@@ -2884,6 +2884,10 @@ DrawingObjectsController.prototype =
var
sRange
=
chartSettings
.
getRange
();
var
sRange
=
chartSettings
.
getRange
();
var
b_clear_formatting
=
false
;
var
b_clear_formatting
=
false
;
chartSpace
.
resetSelection
(
true
);
chartSpace
.
resetSelection
(
true
);
var
oPr
=
this
.
getPropsFromChart
(
chart_space
);
if
(
oPr
.
isEqual
(
chartSettings
)){
return
;
}
if
(
this
.
drawingObjects
&&
this
.
drawingObjects
.
getWorksheet
&&
typeof
sRange
===
"
string
"
&&
sRange
.
length
>
0
)
if
(
this
.
drawingObjects
&&
this
.
drawingObjects
.
getWorksheet
&&
typeof
sRange
===
"
string
"
&&
sRange
.
length
>
0
)
{
{
var
ws_view
=
this
.
drawingObjects
.
getWorksheet
();
var
ws_view
=
this
.
drawingObjects
.
getWorksheet
();
...
...
common/apiCommon.js
View file @
a6075610
...
@@ -228,6 +228,63 @@
...
@@ -228,6 +228,63 @@
asc_ValAxisSettings
.
prototype
=
{
asc_ValAxisSettings
.
prototype
=
{
isEqual
:
function
(
oPr
){
if
(
!
oPr
){
return
false
;
}
if
(
this
.
minValRule
!==
oPr
.
minValRule
){
return
false
;
}
if
(
this
.
minVal
!==
oPr
.
minVal
){
return
false
;
}
if
(
this
.
maxValRule
!==
oPr
.
maxValRule
){
return
false
;
}
if
(
this
.
maxVal
!==
oPr
.
maxVal
){
return
false
;
}
if
(
this
.
invertValOrder
!==
oPr
.
invertValOrder
){
return
false
;
}
if
(
this
.
logScale
!==
oPr
.
logScale
){
return
false
;
}
if
(
this
.
logBase
!==
oPr
.
logBase
){
return
false
;
}
if
(
this
.
dispUnitsRule
!==
oPr
.
dispUnitsRule
){
return
false
;
}
if
(
this
.
units
!==
oPr
.
units
){
return
false
;
}
if
(
this
.
showUnitsOnChart
!==
oPr
.
showUnitsOnChart
){
return
false
;
}
if
(
this
.
majorTickMark
!==
oPr
.
majorTickMark
){
return
false
;
}
if
(
this
.
minorTickMark
!==
oPr
.
minorTickMark
){
return
false
;
}
if
(
this
.
tickLabelsPos
!==
oPr
.
tickLabelsPos
){
return
false
;
}
if
(
this
.
crossesRule
!==
oPr
.
crossesRule
){
return
false
;
}
if
(
this
.
crosses
!==
oPr
.
crosses
){
return
false
;
}
if
(
this
.
axisType
!==
oPr
.
axisType
){
return
false
;
}
return
true
;
},
putAxisType
:
function
(
v
)
{
putAxisType
:
function
(
v
)
{
this
.
axisType
=
v
;
this
.
axisType
=
v
;
},
},
...
@@ -335,6 +392,54 @@
...
@@ -335,6 +392,54 @@
asc_CatAxisSettings
.
prototype
=
{
asc_CatAxisSettings
.
prototype
=
{
isEqual
:
function
(
oPr
){
if
(
!
oPr
){
return
false
;
}
if
(
this
.
intervalBetweenTick
!==
oPr
.
intervalBetweenTick
){
return
false
;
}
if
(
this
.
intervalBetweenLabelsRule
!==
oPr
.
intervalBetweenLabelsRule
){
return
false
;
}
if
(
this
.
intervalBetweenLabels
!==
oPr
.
intervalBetweenLabels
){
return
false
;
}
if
(
this
.
invertCatOrder
!==
oPr
.
invertCatOrder
){
return
false
;
}
if
(
this
.
labelsAxisDistance
!==
oPr
.
labelsAxisDistance
){
return
false
;
}
if
(
this
.
majorTickMark
!==
oPr
.
majorTickMark
){
return
false
;
}
if
(
this
.
minorTickMark
!==
oPr
.
minorTickMark
){
return
false
;
}
if
(
this
.
tickLabelsPos
!==
oPr
.
tickLabelsPos
){
return
false
;
}
if
(
this
.
crossesRule
!==
oPr
.
crossesRule
){
return
false
;
}
if
(
this
.
crosses
!==
oPr
.
crosses
){
return
false
;
}
if
(
this
.
labelsPosition
!==
oPr
.
labelsPosition
){
return
false
;
}
if
(
this
.
axisType
!==
oPr
.
axisType
){
return
false
;
}
if
(
this
.
crossMinVal
!==
oPr
.
crossMinVal
){
return
false
;
}
if
(
this
.
crossMaxVal
!==
oPr
.
crossMaxVal
){
return
false
;
}
return
true
;
},
putIntervalBetweenTick
:
function
(
v
)
{
putIntervalBetweenTick
:
function
(
v
)
{
this
.
intervalBetweenTick
=
v
;
this
.
intervalBetweenTick
=
v
;
},
putIntervalBetweenLabelsRule
:
function
(
v
)
{
},
putIntervalBetweenLabelsRule
:
function
(
v
)
{
...
@@ -457,6 +562,112 @@
...
@@ -457,6 +562,112 @@
}
}
asc_ChartSettings
.
prototype
=
{
asc_ChartSettings
.
prototype
=
{
equalBool
:
function
(
a
,
b
){
return
((
!!
a
)
===
(
!!
b
));
},
isEqual
:
function
(
oPr
){
if
(
!
oPr
){
return
false
;
}
if
(
this
.
style
!==
oPr
.
style
){
return
false
;
}
if
(
this
.
title
!==
oPr
.
title
){
return
false
;
}
if
(
this
.
rowCols
!==
oPr
.
rowCols
){
return
false
;
}
if
(
this
.
horAxisLabel
!==
oPr
.
horAxisLabel
){
return
false
;
}
if
(
this
.
vertAxisLabel
!==
oPr
.
vertAxisLabel
){
return
false
;
}
if
(
this
.
legendPos
!==
oPr
.
legendPos
){
return
false
;
}
if
(
this
.
dataLabelsPos
!==
oPr
.
dataLabelsPos
){
return
false
;
}
if
(
this
.
vertAx
!==
oPr
.
vertAx
){
return
false
;
}
if
(
this
.
horAx
!==
oPr
.
horAx
){
return
false
;
}
if
(
this
.
horGridLines
!==
oPr
.
horGridLines
){
return
false
;
}
if
(
this
.
vertGridLines
!==
oPr
.
vertGridLines
){
return
false
;
}
if
(
this
.
type
!==
oPr
.
type
){
return
false
;
}
if
(
!
this
.
equalBool
(
this
.
showSerName
,
oPr
.
showSerName
)){
return
false
;
}
if
(
!
this
.
equalBool
(
this
.
showCatName
,
oPr
.
showCatName
)){
return
false
;
}
if
(
!
this
.
equalBool
(
this
.
showVal
,
oPr
.
showVal
)){
return
false
;
}
if
(
this
.
separator
!==
oPr
.
separator
&&
!
(
this
.
separator
===
'
'
&&
oPr
.
separator
==
null
||
oPr
.
separator
===
'
'
&&
this
.
separator
==
null
)){
return
false
;
}
if
(
!
this
.
horAxisProps
){
if
(
oPr
.
horAxisProps
){
return
false
;
}
}
else
{
if
(
!
this
.
horAxisProps
.
isEqual
(
oPr
.
horAxisProps
)){
return
false
;
}
}
if
(
!
this
.
vertAxisProps
){
if
(
oPr
.
vertAxisProps
){
return
false
;
}
}
else
{
if
(
!
this
.
vertAxisProps
.
isEqual
(
oPr
.
vertAxisProps
)){
return
false
;
}
}
if
(
this
.
range
!==
oPr
.
range
){
return
false
;
}
if
(
!
this
.
equalBool
(
this
.
inColumns
,
oPr
.
inColumns
)){
return
false
;
}
if
(
!
this
.
equalBool
(
this
.
showMarker
,
oPr
.
showMarker
)){
return
false
;
}
if
(
!
this
.
equalBool
(
this
.
bLine
,
oPr
.
bLine
)){
return
false
;
}
if
(
!
this
.
equalBool
(
this
.
smooth
,
oPr
.
smooth
)){
return
false
;
}
if
(
!
this
.
equalBool
(
this
.
showHorAxis
,
oPr
.
showHorAxis
)){
return
false
;
}
if
(
!
this
.
equalBool
(
this
.
showVerAxis
,
oPr
.
showVerAxis
)){
return
false
;
}
return
true
;
},
putShowMarker
:
function
(
v
)
{
putShowMarker
:
function
(
v
)
{
this
.
showMarker
=
v
;
this
.
showMarker
=
v
;
},
},
...
...
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