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
418fa4a9
Commit
418fa4a9
authored
8 years ago
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ConvertLogicToXY
parent
49e722df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
cell/view/WorkbookView.js
cell/view/WorkbookView.js
+3
-0
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+31
-4
No files found.
cell/view/WorkbookView.js
View file @
418fa4a9
...
...
@@ -3024,6 +3024,9 @@
WorkbookView
.
prototype
.
ConvertXYToLogic
=
function
(
x
,
y
)
{
return
this
.
getWorksheet
().
ConvertXYToLogic
(
x
,
y
);
};
WorkbookView
.
prototype
.
ConvertLogicToXY
=
function
(
xL
,
yL
)
{
return
this
.
getWorksheet
().
ConvertLogicToXY
(
xL
,
yL
);
};
//------------------------------------------------------------export---------------------------------------------------
window
[
'
AscCommonExcel
'
]
=
window
[
'
AscCommonExcel
'
]
||
{};
...
...
This diff is collapsed.
Click to expand it.
cell/view/WorksheetView.js
View file @
418fa4a9
...
...
@@ -13164,13 +13164,40 @@
}
}
x
+=
this
.
cols
[
c
].
left
+
this
.
cols
[
c
].
width
;
y
+=
this
.
rows
[
r
].
top
+
this
.
rows
[
r
].
height
;
x
+=
this
.
cols
[
c
].
left
;
y
+=
this
.
rows
[
r
].
top
;
x
*=
asc_getcvt
(
1
/*p
x*/
,
3
/*pt
*/
,
this
.
_getPPIX
());
y
*=
asc_getcvt
(
1
/*p
x*/
,
3
/*pt
*/
,
this
.
_getPPIY
());
x
*=
asc_getcvt
(
1
/*p
t*/
,
3
/*mm
*/
,
this
.
_getPPIX
());
y
*=
asc_getcvt
(
1
/*p
t*/
,
3
/*mm
*/
,
this
.
_getPPIY
());
return
{
X
:
x
,
Y
:
y
};
};
WorksheetView
.
prototype
.
ConvertLogicToXY
=
function
(
xL
,
yL
)
{
xL
*=
asc_getcvt
(
3
/*mm*/
,
1
/*pt*/
,
this
.
_getPPIX
());
yL
*=
asc_getcvt
(
3
/*mm*/
,
1
/*pt*/
,
this
.
_getPPIY
());
var
c
=
this
.
visibleRange
.
c1
,
cFrozen
,
widthDiff
;
var
r
=
this
.
visibleRange
.
r1
,
rFrozen
,
heightDiff
;
if
(
this
.
topLeftFrozenCell
)
{
cFrozen
=
this
.
topLeftFrozenCell
.
getCol0
();
widthDiff
=
this
.
cols
[
cFrozen
].
left
-
this
.
cols
[
0
].
left
;
if
(
xL
<
this
.
cellsLeft
+
widthDiff
&&
0
!==
widthDiff
)
{
c
=
0
;
}
rFrozen
=
this
.
topLeftFrozenCell
.
getRow0
();
heightDiff
=
this
.
rows
[
rFrozen
].
top
-
this
.
rows
[
0
].
top
;
if
(
yL
<
this
.
cellsTop
+
heightDiff
&&
0
!==
heightDiff
)
{
r
=
0
;
}
}
xL
-=
this
.
cols
[
c
].
left
;
yL
-=
this
.
rows
[
r
].
top
;
xL
*=
asc_getcvt
(
1
/*pt*/
,
0
/*px*/
,
this
.
_getPPIX
());
yL
*=
asc_getcvt
(
1
/*pt*/
,
0
/*px*/
,
this
.
_getPPIY
());
return
{
X
:
xL
,
Y
:
yL
};
};
//------------------------------------------------------------export---------------------------------------------------
window
[
'
AscCommonExcel
'
]
=
window
[
'
AscCommonExcel
'
]
||
{};
...
...
This diff is collapsed.
Click to expand it.
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