WorkspaceCommentSvg constructor arg order should match WorkspaceComment.

This commit is contained in:
Karishma Chadha 2018-06-05 17:49:16 -04:00
parent 42a6637579
commit 5a1eca6384
2 changed files with 4 additions and 3 deletions

View file

@ -467,7 +467,7 @@ Blockly.ContextMenu.workspaceCommentOption = function(ws, e) {
var comment = new Blockly.WorkspaceCommentSvg(
ws, Blockly.Msg.WORKSPACE_COMMENT_DEFAULT_TEXT,
Blockly.WorkspaceCommentSvg.DEFAULT_SIZE,
Blockly.WorkspaceCommentSvg.DEFAULT_SIZE);
Blockly.WorkspaceCommentSvg.DEFAULT_SIZE, false);
var injectionDiv = ws.getInjectionDiv();
// Bounding rect coordinates are in client coordinates, meaning that they

View file

@ -38,12 +38,13 @@ goog.require('Blockly.WorkspaceComment');
* @param {string} content The content of this workspace comment.
* @param {number} height Height of the comment.
* @param {number} width Width of the comment.
* @param {boolean} minimized Whether this comment is minimized.
* @param {string=} opt_id Optional ID. Use this ID if provided, otherwise
* create a new ID.
* @extends {Blockly.WorkspaceComment}
* @constructor
*/
Blockly.WorkspaceCommentSvg = function(workspace, content, height, width,
Blockly.WorkspaceCommentSvg = function(workspace, content, height, width, minimized,
opt_id) {
// Create core elements for the block.
/**
@ -72,7 +73,7 @@ Blockly.WorkspaceCommentSvg = function(workspace, content, height, width,
Blockly.utils.is3dSupported() && !!workspace.blockDragSurface_;
Blockly.WorkspaceCommentSvg.superClass_.constructor.call(this,
workspace, content, height, width, opt_id);
workspace, content, height, width, minimized, opt_id);
this.render();
}; goog.inherits(Blockly.WorkspaceCommentSvg, Blockly.WorkspaceComment);