|
@@ -221,7 +221,8 @@ export const fuseImageJoinHot = async (
|
|
|
rawBlob: Blob,
|
|
|
showTags: CaseTagging[],
|
|
|
width = 500,
|
|
|
- height = 390
|
|
|
+ height = 390,
|
|
|
+ scale = 1
|
|
|
) => {
|
|
|
console.log(width, showTags);
|
|
|
// fuse场景需要特别处理
|
|
@@ -247,11 +248,12 @@ export const fuseImageJoinHot = async (
|
|
|
);
|
|
|
if (index !== -1) {
|
|
|
const bound = hot.getBoundingClientRect();
|
|
|
- const wsize = (img.width / width) * 32;
|
|
|
- const hsize = (img.height / height) * 32;
|
|
|
+ const hscale = img.width / contentDoc.body.offsetWidth;
|
|
|
+ const wsize = hscale * 32;
|
|
|
+ const hsize = hscale * 32;
|
|
|
|
|
|
- const left = bound.left + wsize / 2;
|
|
|
- const top = bound.top + hsize / 2;
|
|
|
+ const left = bound.left * hscale + wsize / 2;
|
|
|
+ const top = bound.top * hscale + hsize / 2;
|
|
|
ctx.save();
|
|
|
ctx.translate(left, top);
|
|
|
ctx.beginPath();
|