From 1b881cfb01bc84f97cbe7424b6465e06d4aa605d Mon Sep 17 00:00:00 2001 From: L-Sun Date: Thu, 29 May 2025 01:47:31 +0000 Subject: [PATCH] chore(editor): add max height to the dragging preview of toc card (#12605) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Close [BS-3030](https://linear.app/affine-design/issue/BS-3030/侧边栏:toc-目录,这里拖动要限定一个最大高度,建议就-500-px) ## Summary by CodeRabbit - **Style** - Limited the drag preview container's height to 500px and hid overflow content for improved visual consistency during drag operations. - **Bug Fixes** - Enhanced drag preview appearance to prevent content from spilling outside the container. --- blocksuite/affine/fragments/outline/src/card/outline-card.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blocksuite/affine/fragments/outline/src/card/outline-card.ts b/blocksuite/affine/fragments/outline/src/card/outline-card.ts index dec224bd7c..cfc6b7ca82 100644 --- a/blocksuite/affine/fragments/outline/src/card/outline-card.ts +++ b/blocksuite/affine/fragments/outline/src/card/outline-card.ts @@ -120,6 +120,8 @@ export class OutlineNoteCard extends SignalWatcher( setOffset({ x: clientX - left, y: clientY - top }); container.style.width = `${this.parentElement?.clientWidth ?? 0}px`; + container.style.maxHeight = '500px'; + container.style.overflow = 'hidden'; container.style.backgroundColor = cssVarV2( 'layer/background/primary' );