From 0b467cf6b32ddb8d0c042b096d0537b99649c6fe Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Thu, 4 Feb 2016 13:25:30 -0800 Subject: [PATCH] Minor style nits from PR #198. --- core/workspace_svg.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/workspace_svg.js b/core/workspace_svg.js index 089a7fd03..34875b2f0 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -1016,19 +1016,19 @@ Blockly.WorkspaceSvg.prototype.zoomCenter = function(type) { }; /** - * Zooming the blocks to fit in the workspace if possible -*/ + * Zoom the blocks to fit in the workspace if possible. + */ Blockly.WorkspaceSvg.prototype.zoomToFit = function() { var workspaceBBox = this.svgBackground_.getBBox(); var blocksBBox = this.svgBlockCanvas_.getBBox(); var workspaceWidth = workspaceBBox.width - this.toolbox_.width - - Blockly.Scrollbar.scrollbarThickness; + Blockly.Scrollbar.scrollbarThickness; var workspaceHeight = workspaceBBox.height - - Blockly.Scrollbar.scrollbarThickness; + Blockly.Scrollbar.scrollbarThickness; var blocksWidth = blocksBBox.width; var blocksHeight = blocksBBox.height; if (blocksWidth == 0) { - return; // prevents zooming to the infinity + return; // Prevents zooming to infinity. } var ratioX = workspaceWidth / blocksWidth; var ratioY = workspaceHeight / blocksHeight;