use clone

This commit is contained in:
Maribeth Bottorff
2021-06-10 16:17:12 -07:00
parent c4f04a7a7b
commit 777b3f46d6

View File

@@ -232,8 +232,7 @@ Blockly.BlockDragSurfaceSvg.prototype.getCurrentBlock = function() {
*/
Blockly.BlockDragSurfaceSvg.prototype.getWsTranslation = function() {
// Returning a copy so the coordinate can not be changed outside this class.
return new Blockly.utils.Coordinate(
this.childSurfaceXY_.x, this.childSurfaceXY_.y);
return this.childSurfaceXY_.clone();
};
/**