@@ -875,13 +875,13 @@ Blockly.Flyout.prototype.createBlockFunc_ = function(originBlock) {
875
875
*/
876
876
Blockly . Flyout . placeNewBlock_ = function ( originBlock , workspace ,
877
877
flyout ) {
878
- var svgRootOld = originBlock . getSvgRoot ( ) ;
879
- if ( ! svgRootOld ) {
878
+ var blockSvgOld = originBlock . getSvgRoot ( ) ;
879
+ if ( ! blockSvgOld ) {
880
880
throw 'originBlock is not rendered.' ;
881
881
}
882
882
// Figure out where the original block is on the screen, relative to the upper
883
883
// left corner of the main workspace.
884
- var xyOld = Blockly . getSvgXY_ ( svgRootOld , workspace ) ;
884
+ var xyOld = Blockly . getSvgXY_ ( blockSvgOld , workspace ) ;
885
885
// Take into account that the flyout might have been scrolled horizontally
886
886
// (separately from the main workspace).
887
887
// Generally a no-op in vertical mode but likely to happen in horizontal
@@ -917,15 +917,15 @@ Blockly.Flyout.placeNewBlock_ = function(originBlock, workspace,
917
917
// Create the new block by cloning the block in the flyout (via XML).
918
918
var xml = Blockly . Xml . blockToDom ( originBlock ) ;
919
919
var block = Blockly . Xml . domToBlock ( workspace , xml ) ;
920
- var svgRootNew = block . getSvgRoot ( ) ;
921
- if ( ! svgRootNew ) {
920
+ var blockSvgNew = block . getSvgRoot ( ) ;
921
+ if ( ! blockSvgNew ) {
922
922
throw 'block is not rendered.' ;
923
923
}
924
924
// Figure out where the new block got placed on the screen, relative to the
925
925
// upper left corner of the workspace. This may not be the same as the
926
926
// original block because the flyout's origin may not be the same as the
927
927
// main workspace's origin.
928
- var xyNew = Blockly . getSvgXY_ ( svgRootNew , workspace ) ;
928
+ var xyNew = Blockly . getSvgXY_ ( blockSvgNew , workspace ) ;
929
929
// Scale the scroll (getSvgXY_ did not do this).
930
930
xyNew . x += workspace . scrollX / workspace . scale - workspace . scrollX ;
931
931
xyNew . y += workspace . scrollY / workspace . scale - workspace . scrollY ;
0 commit comments