mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-08 12:45:55 +08:00
fix(editor): limit max width when uploading or pasting image into edgeless (#9273)
[BS-2180](https://linear.app/affine-design/issue/BS-2180/白板中粘贴图片,限定一下最大宽度)
This commit is contained in:
@@ -339,7 +339,7 @@ function responseToCreateImage(host: EditorHost) {
|
||||
const [x, y] = edgelessRoot.service.viewport.toViewCoord(minX, minY);
|
||||
|
||||
host.doc.transact(() => {
|
||||
addImages(edgelessRoot.std, [img], [x, y])
|
||||
addImages(edgelessRoot.std, [img], { point: [x, y] })
|
||||
.then(blockIds => {
|
||||
const imageBlockId = blockIds[0];
|
||||
const imageBlock = host.doc.getBlock(imageBlockId);
|
||||
|
||||
Reference in New Issue
Block a user