fix(editor): can not create surface block comment (#13115)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved comment handling to ensure elements from all selections are considered, regardless of surface ID. * Enhanced preview generation for comments to include all relevant selections without surface-based filtering. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
1 parent
ecea7bd825
commit
39abd1bbb8
2 files changed
+2
-6
No files matched your search
+1
-2
@@ -123,8 +123,7 @@ export class BlockElementCommentManager extends LifeCycleWatcher {
|
||||
const gfx = this.std.get(GfxControllerIdentifier);
|
||||
const elementsFromSurfaceSelection = selections
|
||||
.filter(s => s instanceof SurfaceSelection)
|
||||
.flatMap(({ blockId, elements }) => {
|
||||
if (blockId !== gfx.surface?.id) return [];
|
||||
.flatMap(({ elements }) => {
|
||||
return elements
|
||||
.map(id => gfx.getElementById<GfxModel>(id))
|
||||
.filter(m => m !== null);
|
||||
|
||||
Reference in new issue
Block a user