From 94d68c3a8c0bb1e2169035e07ab4e13d823d44af Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Tue, 13 Jun 2023 21:51:31 +0000 Subject: [PATCH] chore: PR comments --- plugins/scroll-options/src/index.js | 2 +- plugins/scroll-options/src/utils.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/scroll-options/src/index.js b/plugins/scroll-options/src/index.js index 78b430c4b0..d4e43c8e40 100644 --- a/plugins/scroll-options/src/index.js +++ b/plugins/scroll-options/src/index.js @@ -77,7 +77,7 @@ export class ScrollOptions { return; } - // TODO: We should maybe add an accessor for the svgGroup_? + // TODO(blockly/#7157): We should maybe add an accessor for the svgGroup_? this.wheelEvent_ = Blockly.browserEvents.conditionalBind( this.workspace_.svgGroup_, 'wheel', this, this.onMouseWheel_); } diff --git a/plugins/scroll-options/src/utils.js b/plugins/scroll-options/src/utils.js index 6bba2ae559..d135d84db2 100644 --- a/plugins/scroll-options/src/utils.js +++ b/plugins/scroll-options/src/utils.js @@ -11,8 +11,10 @@ * @returns {!Blockly.utils.Coordinate} The current workspace coordinate. */ export const getTranslation = (ws) => { - // TODO: We should maybe make getBlockCanvas public? + // TODO(blockly/#7157): We should maybe make getBlockCanvas public? const translation = ws.svgBlockCanvas_.getAttribute('transform'); + + // Translation has the format 'translate(x, y)'. const splitted = translation.split(','); const x = Number(splitted[0].split('(')[1]); const y = Number(splitted[1].split(')')[0]);