Skip to content

Commit d1c9fcd

Browse files
Rename variables
1 parent 93f48dd commit d1c9fcd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/flyout.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -875,13 +875,13 @@ Blockly.Flyout.prototype.createBlockFunc_ = function(originBlock) {
875875
*/
876876
Blockly.Flyout.placeNewBlock_ = function(originBlock, workspace,
877877
flyout) {
878-
var svgRootOld = originBlock.getSvgRoot();
879-
if (!svgRootOld) {
878+
var blockSvgOld = originBlock.getSvgRoot();
879+
if (!blockSvgOld) {
880880
throw 'originBlock is not rendered.';
881881
}
882882
// Figure out where the original block is on the screen, relative to the upper
883883
// left corner of the main workspace.
884-
var xyOld = Blockly.getSvgXY_(svgRootOld, workspace);
884+
var xyOld = Blockly.getSvgXY_(blockSvgOld, workspace);
885885
// Take into account that the flyout might have been scrolled horizontally
886886
// (separately from the main workspace).
887887
// Generally a no-op in vertical mode but likely to happen in horizontal
@@ -917,15 +917,15 @@ Blockly.Flyout.placeNewBlock_ = function(originBlock, workspace,
917917
// Create the new block by cloning the block in the flyout (via XML).
918918
var xml = Blockly.Xml.blockToDom(originBlock);
919919
var block = Blockly.Xml.domToBlock(workspace, xml);
920-
var svgRootNew = block.getSvgRoot();
921-
if (!svgRootNew) {
920+
var blockSvgNew = block.getSvgRoot();
921+
if (!blockSvgNew) {
922922
throw 'block is not rendered.';
923923
}
924924
// Figure out where the new block got placed on the screen, relative to the
925925
// upper left corner of the workspace. This may not be the same as the
926926
// original block because the flyout's origin may not be the same as the
927927
// main workspace's origin.
928-
var xyNew = Blockly.getSvgXY_(svgRootNew, workspace);
928+
var xyNew = Blockly.getSvgXY_(blockSvgNew, workspace);
929929
// Scale the scroll (getSvgXY_ did not do this).
930930
xyNew.x += workspace.scrollX / workspace.scale - workspace.scrollX;
931931
xyNew.y += workspace.scrollY / workspace.scale - workspace.scrollY;

0 commit comments

Comments
 (0)