Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
Luckysheet
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
宁天庆
Luckysheet
Commits
88da4bfd
Commit
88da4bfd
authored
Oct 31, 2025
by
宁天庆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改复制
parent
1ea469c2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
handler.js
src/controllers/handler.js
+0
-0
selection.js
src/controllers/selection.js
+0
-0
api.js
src/global/api.js
+14
-1
No files found.
src/controllers/handler.js
View file @
88da4bfd
This diff is collapsed.
Click to expand it.
src/controllers/selection.js
View file @
88da4bfd
This diff is collapsed.
Click to expand it.
src/global/api.js
View file @
88da4bfd
...
@@ -7142,6 +7142,7 @@ export function getScreenshotWithImg(action, options = {}) {
...
@@ -7142,6 +7142,7 @@ export function getScreenshotWithImg(action, options = {}) {
// ctx_newCanvas.closePath();
// ctx_newCanvas.closePath();
//获取插入图片的元素,并在canvas上进行绘制
//获取插入图片的元素,并在canvas上进行绘制
let
imagePromises
=
[];
if
(
$
(
'#luckysheet-image-showBoxs'
))
{
if
(
$
(
'#luckysheet-image-showBoxs'
))
{
var
imgs
=
$
(
'#luckysheet-image-showBoxs img'
);
var
imgs
=
$
(
'#luckysheet-image-showBoxs img'
);
imgs
.
each
(
function
(
i
)
{
imgs
.
each
(
function
(
i
)
{
...
@@ -7150,11 +7151,21 @@ export function getScreenshotWithImg(action, options = {}) {
...
@@ -7150,11 +7151,21 @@ export function getScreenshotWithImg(action, options = {}) {
var
top
=
parent
.
css
(
"top"
).
replace
(
'px'
,
''
);
var
top
=
parent
.
css
(
"top"
).
replace
(
'px'
,
''
);
var
width
=
parent
.
css
(
"width"
).
replace
(
'px'
,
''
);
var
width
=
parent
.
css
(
"width"
).
replace
(
'px'
,
''
);
var
height
=
parent
.
css
(
"height"
).
replace
(
'px'
,
''
);
var
height
=
parent
.
css
(
"height"
).
replace
(
'px'
,
''
);
imagePromises
.
push
(
new
Promise
((
resolve
,
reject
)
=>
{
var
img
=
new
Image
()
var
img
=
new
Image
()
img
.
src
=
$
(
this
).
attr
(
"src"
);
img
.
src
=
$
(
this
).
attr
(
"src"
);
ctx_newCanvas
.
drawImage
(
img
,
left
,
top
,
width
,
height
);
img
.
onload
=
()
=>
{
ctx_newCanvas
.
drawImage
(
img
,
left
-
(
visibledatacolumn
[
stc
-
1
]
||
0
),
top
-
visibledatarow
[
str
-
1
]
||
0
,
width
,
height
);
resolve
()
}
img
.
onerror
=
()
=>
resolve
();
}));
});
});
}
}
Promise
.
all
(
imagePromises
).
then
((
d
)
=>
{
//获取统计图元素,并在canvas上进行绘制
//获取统计图元素,并在canvas上进行绘制
let
targetDoms
=
document
.
querySelectorAll
(
'.luckysheet-modal-dialog.luckysheet-modal-dialog-chart.luckysheet-data-visualization-chart'
);
let
targetDoms
=
document
.
querySelectorAll
(
'.luckysheet-modal-dialog.luckysheet-modal-dialog-chart.luckysheet-data-visualization-chart'
);
var
chartCount
=
0
;
var
chartCount
=
0
;
...
@@ -7166,6 +7177,8 @@ export function getScreenshotWithImg(action, options = {}) {
...
@@ -7166,6 +7177,8 @@ export function getScreenshotWithImg(action, options = {}) {
action
(
newCanvas
.
get
(
0
).
toDataURL
(
"image/png"
,
1
));
action
(
newCanvas
.
get
(
0
).
toDataURL
(
"image/png"
,
1
));
}
}
}
}
});
}
}
/**
/**
...
...
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