diff --git a/core/comments/comment_view.ts b/core/comments/comment_view.ts index 8fa3ea694..bda2b9762 100644 --- a/core/comments/comment_view.ts +++ b/core/comments/comment_view.ts @@ -104,7 +104,7 @@ export class CommentView implements IRenderedElement { constructor(private readonly workspace: WorkspaceSvg) { this.svgRoot = dom.createSvgElement(Svg.G, { - 'class': 'blocklyComment blocklyEditable', + 'class': 'blocklyComment blocklyEditable blocklyDraggable', }); this.highlightRect = this.createHighlightRect(this.svgRoot); diff --git a/core/comments/rendered_workspace_comment.ts b/core/comments/rendered_workspace_comment.ts index 1234d6ef8..79caf6a1d 100644 --- a/core/comments/rendered_workspace_comment.ts +++ b/core/comments/rendered_workspace_comment.ts @@ -57,6 +57,7 @@ export class RenderedWorkspaceComment // Set the size to the default size as defined in the superclass. this.view.setSize(this.getSize()); this.view.setEditable(this.isEditable()); + this.view.getSvgRoot().setAttribute('data-id', this.id); this.addModelUpdateBindings(); diff --git a/core/workspace.ts b/core/workspace.ts index 2e9b2b0a1..16f32611b 100644 --- a/core/workspace.ts +++ b/core/workspace.ts @@ -748,7 +748,6 @@ export class Workspace implements IASTNodeLocation { * * @param id ID of comment to find. * @returns The sought after comment, or null if not found. - * @internal */ getCommentById(id: string): WorkspaceComment | null { return this.commentDB.get(id) ?? null;