mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix: drag block issue (#9902)
### Changed - Added support for changing the preview offset during dragging. - Fixed the preview rendering for embed block and surface-ref block - Resolved an issue where the host element might be reused in certain cases, which could cause unexpected behavior - Moved viewport-related constants and methods to a more appropriate location
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { requestConnectedFrame } from '@blocksuite/affine-shared/utils';
|
||||
import { assertExists } from '@blocksuite/global/utils';
|
||||
import {
|
||||
arrow,
|
||||
@@ -188,9 +189,9 @@ export class Tooltip extends LitElement {
|
||||
assertExists(parent, 'Tooltip must have a parent element');
|
||||
|
||||
// Wait for render
|
||||
setTimeout(() => {
|
||||
requestConnectedFrame(() => {
|
||||
this._hoverController.setReference(parent);
|
||||
}, 0);
|
||||
}, this);
|
||||
};
|
||||
|
||||
private _getStyles() {
|
||||
|
||||
Reference in New Issue
Block a user