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
bc4f79c7
Commit
bc4f79c7
authored
Jan 20, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ previous revision
parent
5e5f5b56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
47 deletions
+46
-47
cell/view/WorkbookView.js
cell/view/WorkbookView.js
+46
-47
No files found.
cell/view/WorkbookView.js
View file @
bc4f79c7
...
...
@@ -2687,51 +2687,51 @@
};
WorkbookView
.
prototype
.
af_getSmallIconTable
=
function
(
canvas
,
style
,
fmgrGraphics
,
oFont
,
props
)
{
var
ctx
=
new
Asc
.
DrawingContext
({
canvas
:
canvas
,
units
:
1
/*pt*/
,
fmgrGraphics
:
fmgrGraphics
,
font
:
oFont
});
var
styleOptions
=
style
;
//по умолчанию ставим строку заголовка и чередующиеся строки, позже нужно будет получать параметр
var
styleInfo
;
if
(
props
)
{
styleInfo
=
{
ShowColumnStripes
:
props
.
asc_getBandVer
(),
ShowFirstColumn
:
props
.
asc_getFirstCol
(),
ShowLastColumn
:
props
.
asc_getLastCol
(),
ShowRowStripes
:
props
.
asc_getBandHor
(),
HeaderRowCount
:
props
.
asc_getFirstRow
(),
TotalsRowCount
:
props
.
asc_getLastRow
()
};
}
else
{
styleInfo
=
{
ShowColumnStripes
:
false
,
ShowFirstColumn
:
false
,
ShowLastColumn
:
false
,
ShowRowStripes
:
true
,
HeaderRowCount
:
true
,
TotalsRowCount
:
false
};
}
var
ctx
=
new
Asc
.
DrawingContext
({
canvas
:
canvas
,
units
:
1
/*pt*/
,
fmgrGraphics
:
fmgrGraphics
,
font
:
oFont
});
//по умолчанию ставим строку заголовка и чередующиеся строки, позже нужно будет получать параметр
var
styleInfo
;
if
(
props
)
{
styleInfo
=
{
ShowColumnStripes
:
props
.
asc_getBandVer
(),
ShowFirstColumn
:
props
.
asc_getFirstCol
(),
ShowLastColumn
:
props
.
asc_getLastCol
(),
ShowRowStripes
:
props
.
asc_getBandHor
(),
HeaderRowCount
:
props
.
asc_getFirstRow
(),
TotalsRowCount
:
props
.
asc_getLastRow
()
};
}
else
{
styleInfo
=
{
ShowColumnStripes
:
false
,
ShowFirstColumn
:
false
,
ShowLastColumn
:
false
,
ShowRowStripes
:
true
,
HeaderRowCount
:
true
,
TotalsRowCount
:
false
};
}
var
pxToMM
=
72
/
96
;
var
pxToMM
=
72
/
96
;
var
startX
=
1
*
pxToMM
;
var
startY
=
1
*
pxToMM
;
var
ySize
=
45
*
pxToMM
-
2
*
startY
;
var
xSize
=
61
*
pxToMM
-
2
*
startX
;
var
stepY
=
(
ySize
)
/
5
;
var
stepX
=
(
xSize
-
1
*
pxToMM
)
/
5
;
var
whiteColor
=
new
CColor
(
255
,
255
,
255
);
var
blackColor
=
new
CColor
(
0
,
0
,
0
);
var
ySize
=
45
*
pxToMM
-
2
*
startY
;
var
xSize
=
61
*
pxToMM
-
2
*
startX
;
var
defaultColor
;
if
(
!
styleOptions
||
!
styleOptions
.
wholeTable
||
!
styleOptions
.
wholeTable
.
dxf
.
font
)
{
defaultColor
=
blackColor
;
}
else
{
defaultColor
=
styleOptions
.
wholeTable
.
dxf
.
font
.
getColor
();
}
var
stepY
=
(
ySize
)
/
5
;
var
stepX
=
(
xSize
)
/
5
;
var
lineStepX
=
(
xSize
-
1
*
pxToMM
)
/
5
;
var
whiteColor
=
new
CColor
(
255
,
255
,
255
);
var
blackColor
=
new
CColor
(
0
,
0
,
0
);
var
defaultColor
;
if
(
!
style
||
!
style
.
wholeTable
||
!
style
.
wholeTable
.
dxf
.
font
)
{
defaultColor
=
blackColor
;
}
else
{
defaultColor
=
style
.
wholeTable
.
dxf
.
font
.
getColor
();
}
var
headerRowCount
=
1
;
var
totalsRowCount
=
0
;
if
(
null
!=
styleInfo
.
HeaderRowCount
)
...
...
@@ -2739,11 +2739,10 @@
if
(
null
!=
styleInfo
.
TotalsRowCount
)
totalsRowCount
=
styleInfo
.
TotalsRowCount
;
if
(
styleOptions
.
wholeTable
&&
styleOptions
.
wholeTable
.
dxf
.
fill
&&
null
!=
styleOptions
.
wholeTable
.
dxf
.
fill
.
bg
)
{
ctx
.
setFillStyle
(
styleOptions
.
wholeTable
.
dxf
.
fill
.
bg
);
ctx
.
fillRect
(
startX
,
startY
,
xSize
,
ySize
);
}
else
{
ctx
.
setFillStyle
(
whiteColor
);
ctx
.
setFillStyle
(
whiteColor
);
ctx
.
fillRect
(
0
,
0
,
xSize
+
2
*
startX
,
ySize
+
2
*
startY
);
if
(
style
.
wholeTable
&&
style
.
wholeTable
.
dxf
.
fill
&&
null
!=
style
.
wholeTable
.
dxf
.
fill
.
bg
)
{
ctx
.
setFillStyle
(
style
.
wholeTable
.
dxf
.
fill
.
bg
);
ctx
.
fillRect
(
startX
,
startY
,
xSize
,
ySize
);
}
...
...
@@ -2795,13 +2794,13 @@
if
(
curStyle
&&
curStyle
.
border
&&
curStyle
.
border
.
l
&&
curStyle
.
border
.
l
.
w
!==
0
)
{
color
=
curStyle
.
border
.
l
.
c
;
calculateLineVer
(
color
,
j
*
s
tepX
,
i
*
stepY
,
(
i
+
1
)
*
stepY
);
calculateLineVer
(
color
,
j
*
lineS
tepX
,
i
*
stepY
,
(
i
+
1
)
*
stepY
);
}
//right
if
(
curStyle
&&
curStyle
.
border
&&
curStyle
.
border
.
r
&&
curStyle
.
border
.
r
.
w
!==
0
)
{
color
=
curStyle
.
border
.
r
.
c
;
calculateLineVer
(
color
,
(
j
+
1
)
*
s
tepX
,
i
*
stepY
,
(
i
+
1
)
*
stepY
);
calculateLineVer
(
color
,
(
j
+
1
)
*
lineS
tepX
,
i
*
stepY
,
(
i
+
1
)
*
stepY
);
}
//top
if
(
curStyle
&&
curStyle
.
border
&&
curStyle
.
border
.
t
&&
curStyle
.
border
.
t
.
w
!==
0
)
...
...
@@ -2822,7 +2821,7 @@
{
color
=
curStyle
.
font
.
c
;
}
calculateLineHor
(
color
,
j
*
stepX
+
3
*
pxToMM
,
(
i
+
1
)
*
stepY
-
stepY
/
2
,
(
j
+
1
)
*
s
tepX
-
2
*
pxToMM
);
calculateLineHor
(
color
,
j
*
lineStepX
+
3
*
pxToMM
,
(
i
+
1
)
*
stepY
-
stepY
/
2
,
(
j
+
1
)
*
lineS
tepX
-
2
*
pxToMM
);
}
}
...
...
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