File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,19 +41,24 @@ export class CollapseCommentBarButton extends CommentBarButton {
4141 * @param container An SVG group that this button should be a child of.
4242 */
4343 constructor (
44- protected readonly id : string ,
45- protected readonly workspace : WorkspaceSvg ,
46- protected readonly container : SVGGElement ,
47- protected readonly commentView : CommentView ,
44+ id : string ,
45+ workspace : WorkspaceSvg ,
46+ container : SVGGElement ,
47+ commentView : CommentView ,
4848 ) {
49- super ( id , workspace , container , commentView ) ;
49+ super (
50+ `${ id } ${ COMMENT_COLLAPSE_BAR_BUTTON_FOCUS_IDENTIFIER } ` ,
51+ workspace ,
52+ container ,
53+ commentView ,
54+ ) ;
5055
5156 this . icon = dom . createSvgElement (
5257 Svg . IMAGE ,
5358 {
5459 'class' : 'blocklyFoldoutIcon' ,
5560 'href' : `${ this . workspace . options . pathToMedia } foldout-icon.svg` ,
56- 'id' : ` ${ this . id } ${ COMMENT_COLLAPSE_BAR_BUTTON_FOCUS_IDENTIFIER } ` ,
61+ 'id' : this . id ,
5762 } ,
5863 this . container ,
5964 ) ;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export abstract class CommentBarButton implements IFocusableNode {
2828 * @param container An SVG group that this button should be a child of.
2929 */
3030 constructor (
31- protected readonly id : string ,
31+ readonly id : string ,
3232 protected readonly workspace : WorkspaceSvg ,
3333 protected readonly container : SVGGElement ,
3434 protected readonly commentView : CommentView ,
Original file line number Diff line number Diff line change @@ -41,19 +41,24 @@ export class DeleteCommentBarButton extends CommentBarButton {
4141 * @param container An SVG group that this button should be a child of.
4242 */
4343 constructor (
44- protected readonly id : string ,
45- protected readonly workspace : WorkspaceSvg ,
46- protected readonly container : SVGGElement ,
47- protected readonly commentView : CommentView ,
44+ id : string ,
45+ workspace : WorkspaceSvg ,
46+ container : SVGGElement ,
47+ commentView : CommentView ,
4848 ) {
49- super ( id , workspace , container , commentView ) ;
49+ super (
50+ `${ id } ${ COMMENT_DELETE_BAR_BUTTON_FOCUS_IDENTIFIER } ` ,
51+ workspace ,
52+ container ,
53+ commentView ,
54+ ) ;
5055
5156 this . icon = dom . createSvgElement (
5257 Svg . IMAGE ,
5358 {
5459 'class' : 'blocklyDeleteIcon' ,
5560 'href' : `${ this . workspace . options . pathToMedia } delete-icon.svg` ,
56- 'id' : ` ${ this . id } ${ COMMENT_DELETE_BAR_BUTTON_FOCUS_IDENTIFIER } ` ,
61+ 'id' : this . id ,
5762 } ,
5863 container ,
5964 ) ;
Original file line number Diff line number Diff line change @@ -254,7 +254,8 @@ export class WorkspaceSvg
254254 * @param e The right-click event that triggered the context menu.
255255 */
256256 configureContextMenu :
257- ( ( menuOptions : ContextMenuOption [ ] , e : Event ) => void ) | null = null ;
257+ | ( ( menuOptions : ContextMenuOption [ ] , e : Event ) => void )
258+ | null = null ;
258259
259260 /**
260261 * A dummy wheel event listener used as a workaround for a Safari scrolling issue.
@@ -2977,8 +2978,7 @@ export class WorkspaceSvg
29772978 return (
29782979 comment . view
29792980 . getCommentBarButtons ( )
2980- . find ( ( button ) => button . getFocusableElement ( ) . id . includes ( id ) ) ??
2981- null
2981+ . find ( ( button ) => button . id . includes ( id ) ) ?? null
29822982 ) ;
29832983 }
29842984 }
You can’t perform that action at this time.
0 commit comments