Skip to content
Snippets Groups Projects
Commit 1a7cda31 authored by jojohoch's avatar jojohoch
Browse files

[editor] Add comment for GetAnchorIdsPipe

parent 11a08396
No related branches found
No related tags found
No related merge requests found
......@@ -105,6 +105,9 @@ export class ButtonPropertiesComponent {
name: 'getAnchorIds'
})
export class GetAnchorIdsPipe implements PipeTransform {
// There can be multiple elements with the same data-anchor-id,
// since a selected range can include multiple HTMLElements.
// The first element is filtered out for display in the properties panel.
transform(textComponents: { [id: string]: TextComponent }): string[] {
return Object.values(textComponents)
.map(textComponent => Array.from(textComponent.textContainerRef.nativeElement.querySelectorAll('aspect-anchor'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment