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
3865316a
Commit
3865316a
authored
Feb 06, 2017
by
Alexey.Musinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up
parent
2de28ba9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
42 deletions
+47
-42
cell/native/native.js
cell/native/native.js
+47
-42
No files found.
cell/native/native.js
View file @
3865316a
...
...
@@ -3229,6 +3229,9 @@ function OfflineEditor () {
if
(
-
1
!==
index
)
{
if
(
isColHeader
)
{
if
(
w
<
this
.
width_1px
)
{
if
(
style
!==
kHeaderDefault
)
{
return
;
}
// Это невидимый столбец
isZeroHeader
=
true
;
// Отрисуем только границу
...
...
@@ -3245,6 +3248,9 @@ function OfflineEditor () {
}
}
else
{
if
(
h
<
this
.
height_1px
)
{
if
(
style
!==
kHeaderDefault
)
{
return
;
}
// Это невидимая строка
isZeroHeader
=
true
;
// Отрисуем только границу
...
...
@@ -3273,7 +3279,7 @@ function OfflineEditor () {
if
(
!
isZeroHeader
)
{
// draw background
ctx
.
setFillStyle
(
st
.
background
)
.
fillRect
(
x
,
y
,
w
+
20
,
h
+
20
);
.
fillRect
(
x
,
y
,
w
+
5
,
h
+
5
);
}
// draw border
ctx
.
setStrokeStyle
(
st
.
border
)
...
...
@@ -3281,17 +3287,17 @@ function OfflineEditor () {
.
beginPath
();
if
(
style
!==
kHeaderDefault
&&
!
isColHeader
)
{
// Select row (top border)
ctx
.
lineHorPrevPx
(
x
,
y
,
x2
);
//
ctx.lineHorPrevPx(x, y, x2);
}
// Right border
if
(
isColHeader
)
ctx
.
lineVerPrevPx
(
x2
,
y
,
y2
);
if
(
isColHeader
)
ctx
.
lineVerPrevPx
(
x2
,
y
,
y2
+
5
);
// Bottom border
if
(
!
isColHeader
)
ctx
.
lineHorPrevPx
(
x
,
y2
,
x2
);
if
(
!
isColHeader
)
ctx
.
lineHorPrevPx
(
x
,
y2
,
x2
+
5
);
if
(
style
!==
kHeaderDefault
&&
isColHeader
)
{
// Select col (left border)
//
ctx.lineVerPrevPx(x, y, y2);
ctx
.
lineVerPrevPx
(
x
,
y
,
y2
);
}
ctx
.
stroke
();
...
...
@@ -3302,7 +3308,7 @@ function OfflineEditor () {
// draw text
var
text
=
isColHeader
?
this
.
_getColumnTitle
(
index
)
:
this
.
_getRowTitle
(
index
);
var
sr
=
this
.
stringRender
;
var
tm
=
this
.
_roundTextMetrics
(
sr
.
measureString
(
text
)
);
var
tm
=
this
.
_roundTextMetrics
(
sr
.
measureString
(
text
)
);
var
bl
=
y2WithoutBorder
-
(
isColHeader
?
this
.
defaultRowDescender
:
this
.
rows
[
index
].
descender
);
var
textX
=
this
.
_calcTextHorizPos
(
x
,
x2WithoutBorder
,
tm
,
tm
.
width
<
w
?
AscCommon
.
align_Center
:
AscCommon
.
align_Left
);
var
textY
=
this
.
_calcTextVertPos
(
y
,
y2WithoutBorder
,
bl
,
tm
,
Asc
.
c_oAscVAlign
.
Bottom
);
...
...
@@ -3323,35 +3329,34 @@ function OfflineEditor () {
};
AscCommonExcel
.
WorksheetView
.
prototype
.
__drawRowHeaders
=
function
(
drawingCtx
,
start
,
end
,
style
,
offsetXForDraw
,
offsetYForDraw
)
{
if
(
undefined
===
drawingCtx
&&
false
===
this
.
model
.
sheetViews
[
0
].
asc_getShowRowColHeaders
())
if
(
undefined
===
drawingCtx
&&
false
===
this
.
model
.
sheetViews
[
0
].
asc_getShowRowColHeaders
())
{
return
;
var
range
=
new
asc_Range
(
0
,
start
,
1
,
end
);
this
.
_prepareCellTextMetricsCache
(
range
);
}
var
vr
=
this
.
visibleRange
;
var
r
=
this
.
rows
;
var
offsetX
=
(
undefined
!==
offsetXForDraw
)
?
offsetXForDraw
:
this
.
headersLeft
;
var
offsetY
=
(
undefined
!==
offsetYForDraw
)
?
offsetYForDraw
:
r
[
vr
.
r1
].
top
-
this
.
cellsTop
;
if
(
undefined
===
drawingCtx
&&
this
.
topLeftFrozenCell
&&
undefined
===
offsetYForDraw
)
{
var
rFrozen
=
this
.
topLeftFrozenCell
.
getRow0
();
if
(
start
<
vr
.
r1
)
if
(
start
<
vr
.
r1
)
{
offsetY
=
r
[
0
].
top
-
this
.
cellsTop
;
else
}
else
{
offsetY
-=
r
[
rFrozen
].
top
-
r
[
0
].
top
;
}
}
if
(
asc_typeof
(
start
)
!==
"
number
"
)
{
start
=
vr
.
r1
;}
if
(
asc_typeof
(
end
)
!==
"
number
"
)
{
end
=
vr
.
r2
;}
if
(
style
===
undefined
)
{
style
=
kHeaderDefault
;}
if
(
asc_typeof
(
start
)
!==
"
number
"
)
{
start
=
vr
.
r1
;
}
if
(
asc_typeof
(
end
)
!==
"
number
"
)
{
end
=
vr
.
r2
;
}
if
(
style
===
undefined
)
{
style
=
kHeaderDefault
;
}
this
.
_setFont
(
drawingCtx
,
this
.
model
.
getDefaultFontName
(),
this
.
model
.
getDefaultFontSize
());
var
ctx
=
(
drawingCtx
)
?
drawingCtx
:
this
.
drawingCtx
;
var
st
=
this
.
settings
.
header
.
style
[
style
];
ctx
.
setFillStyle
(
st
.
border
)
.
fillRect
(
offsetX
,
-
offsetY
,
this
.
headersWidth
*
2
,
r
[
end
].
top
-
r
[
start
].
top
);
// draw row headers
for
(
var
i
=
start
;
i
<=
end
;
++
i
)
{
this
.
__drawHeader
(
drawingCtx
,
offsetX
,
r
[
i
].
top
-
r
[
start
].
top
-
offsetY
,
...
...
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