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
5fac0445
Commit
5fac0445
authored
May 20, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add method getCellCoord with params col and row
parent
73ef635b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+18
-15
No files found.
cell/view/WorksheetView.js
View file @
5fac0445
...
...
@@ -7544,20 +7544,23 @@
// Получаем координаты активной ячейки
WorksheetView
.
prototype
.
getActiveCellCoord
=
function
()
{
return
this
.
getCellCoord
(
this
.
activeRange
.
startCol
,
this
.
activeRange
.
startRow
);
};
WorksheetView
.
prototype
.
getCellCoord
=
function
(
col
,
row
)
{
var
offsetX
=
0
,
offsetY
=
0
;
var
vrCol
=
this
.
visibleRange
.
c1
,
vrRow
=
this
.
visibleRange
.
r1
;
if
(
this
.
topLeftFrozenCell
)
{
var
offsetFrozen
=
this
.
getFrozenPaneOffset
();
var
cFrozen
=
this
.
topLeftFrozenCell
.
getCol0
();
var
rFrozen
=
this
.
topLeftFrozenCell
.
getRow0
();
if
(
this
.
activeRange
.
startC
ol
>=
cFrozen
)
{
if
(
c
ol
>=
cFrozen
)
{
offsetX
=
offsetFrozen
.
offsetX
;
}
else
{
vrCol
=
0
;
}
if
(
this
.
activeRange
.
startR
ow
>=
rFrozen
)
{
if
(
r
ow
>=
rFrozen
)
{
offsetY
=
offsetFrozen
.
offsetY
;
}
else
{
...
...
@@ -7565,8 +7568,8 @@
}
}
var
xL
=
this
.
getCellLeft
(
this
.
activeRange
.
startC
ol
,
/*pt*/
1
);
var
yL
=
this
.
getCellTop
(
this
.
activeRange
.
startR
ow
,
/*pt*/
1
);
var
xL
=
this
.
getCellLeft
(
c
ol
,
/*pt*/
1
);
var
yL
=
this
.
getCellTop
(
r
ow
,
/*pt*/
1
);
// Пересчитываем X и Y относительно видимой области
xL
-=
(
this
.
cols
[
vrCol
].
left
-
this
.
cellsLeft
);
yL
-=
(
this
.
rows
[
vrRow
].
top
-
this
.
cellsTop
);
...
...
@@ -7578,8 +7581,8 @@
xL
*=
asc_getcvt
(
1
/*pt*/
,
0
/*px*/
,
this
.
_getPPIX
()
);
yL
*=
asc_getcvt
(
1
/*pt*/
,
0
/*px*/
,
this
.
_getPPIY
()
);
var
width
=
this
.
getColumnWidth
(
this
.
activeRange
.
startC
ol
,
/*px*/
0
);
var
height
=
this
.
getRowHeight
(
this
.
activeRange
.
startR
ow
,
/*px*/
0
);
var
width
=
this
.
getColumnWidth
(
c
ol
,
/*px*/
0
);
var
height
=
this
.
getRowHeight
(
r
ow
,
/*px*/
0
);
if
(
AscBrowser
.
isRetina
)
{
xL
>>=
1
;
...
...
@@ -12836,9 +12839,9 @@
var
rangeButton
=
Asc
.
Range
(
autoFilter
.
Ref
.
c1
+
colId
,
autoFilter
.
Ref
.
r1
,
autoFilter
.
Ref
.
c1
+
colId
,
autoFilter
.
Ref
.
r1
);
var
cellId
=
ws
.
autoFilters
.
_rangeToId
(
rangeButton
);
var
posX
=
(
this
.
cols
[
autoFilter
.
Ref
.
c1
+
colId
].
left
+
this
.
cols
[
autoFilter
.
Ref
.
c1
+
colId
].
width
)
/
0.75
;
var
posY
=
(
this
.
rows
[
autoFilter
.
Ref
.
r1
].
top
+
this
.
rows
[
autoFilter
.
Ref
.
r1
].
height
)
/
0.75
;
var
posX
=
(
this
.
cols
[
autoFilter
.
Ref
.
c1
+
colId
].
left
+
this
.
cols
[
autoFilter
.
Ref
.
c1
+
colId
].
width
)
/
0.75
;
var
posY
=
(
this
.
rows
[
autoFilter
.
Ref
.
r1
].
top
+
this
.
rows
[
autoFilter
.
Ref
.
r1
].
height
)
/
0.75
;
//get filter object
var
filterObj
=
new
Asc
.
AutoFilterObj
();
...
...
@@ -12923,8 +12926,8 @@
var
autoFilterObject
=
new
Asc
.
AutoFiltersOptions
();
autoFilterObject
.
asc_setSortState
(
sortVal
);
autoFilterObject
.
asc_setCellPosX
(
posX
);
autoFilterObject
.
asc_setCellPosY
(
posY
);
autoFilterObject
.
asc_setCellPosX
(
posX
);
autoFilterObject
.
asc_setCellPosY
(
posY
);
autoFilterObject
.
asc_setCellId
(
cellId
);
autoFilterObject
.
asc_setValues
(
values
);
autoFilterObject
.
asc_setFilterObj
(
filterObj
);
...
...
@@ -13017,10 +13020,10 @@
//добавляем без цвета ячейку
if
(
!
cell
)
{
if
(
true
!==
alreadyAddColors
[
null
])
{
alreadyAddColors
[
null
]
=
true
;
res
.
colors
.
push
(
null
);
if
(
true
!==
alreadyAddColors
[
null
])
{
alreadyAddColors
[
null
]
=
true
;
res
.
colors
.
push
(
null
);
}
continue
;
}
...
...
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