mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 14:28:51 +08:00
680f3b3006
#### PR Dependency Tree
* **PR #13464**
* **PR #13465**
* **PR #13471** 👈
* **PR #13472**
* **PR #13473**
This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* DOM rendering added for groups, mind maps and connectors so group
titles/outlines and mindmap connectors are visible on canvas.
* Shapes now support right-to-left text with proper vertical alignment.
* **Improvements**
* Connector labels scale with viewport zoom for crisper display.
* Group-related selections (including nested groups) now update visuals
consistently.
* **Performance**
* Reduced DOM churn and fewer redraws during rendering and selection
changes.
* **Refactor**
* Renderer import/export surfaces consolidated with no user-facing
behavior changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
35 lines
1007 B
TypeScript
35 lines
1007 B
TypeScript
import {
|
|
type ViewExtensionContext,
|
|
ViewExtensionProvider,
|
|
} from '@blocksuite/affine-ext-loader';
|
|
|
|
import { effects } from './effects';
|
|
import { GroupElementView, GroupInteraction } from './element-view';
|
|
import { GroupInteractionExtension } from './interaction-ext';
|
|
import {
|
|
GroupDomRendererExtension,
|
|
GroupElementRendererExtension,
|
|
} from './renderer';
|
|
import { groupToolbarExtension } from './toolbar/config';
|
|
|
|
export class GroupViewExtension extends ViewExtensionProvider {
|
|
override name = 'affine-group-gfx';
|
|
|
|
override effect(): void {
|
|
super.effect();
|
|
effects();
|
|
}
|
|
|
|
override setup(context: ViewExtensionContext) {
|
|
super.setup(context);
|
|
context.register(GroupElementRendererExtension);
|
|
context.register(GroupDomRendererExtension);
|
|
context.register(GroupElementView);
|
|
if (this.isEdgeless(context.scope)) {
|
|
context.register(groupToolbarExtension);
|
|
context.register(GroupInteraction);
|
|
context.register(GroupInteractionExtension);
|
|
}
|
|
}
|
|
}
|