Update todos and requires.

This commit is contained in:
Neil Fraser
2018-10-16 01:40:42 -07:00
committed by Neil Fraser
parent c7e391c71a
commit db0dbc69ee
15 changed files with 25 additions and 13 deletions

View File

@@ -39,7 +39,6 @@ goog.require('Blockly.Mutator');
goog.require('Blockly.utils');
goog.require('Blockly.Warning');
goog.require('Blockly.Workspace');
goog.require('Blockly.Xml');
goog.require('goog.math.Coordinate');

View File

@@ -568,7 +568,7 @@ Blockly.BlockSvg.prototype.createTabList_ = function() {
for (var i = 0, input; input = this.inputList[i]; i++) {
for (var j = 0, field; field = input.fieldRow[j]; j++) {
if (field instanceof Blockly.FieldTextInput) {
// TODO(# 1276): Also support dropdown fields.
// TODO (#1276): Also support dropdown fields.
list.push(field);
}
}

View File

@@ -53,6 +53,7 @@ goog.require('Blockly.WorkspaceSvg');
goog.require('Blockly.constants');
goog.require('Blockly.inject');
goog.require('Blockly.utils');
goog.require('Blockly.Xml');
goog.require('goog.color');

View File

@@ -27,6 +27,7 @@
goog.provide('Blockly.Connection');
goog.require('Blockly.Events.BlockMove');
goog.require('Blockly.Xml');
/**

View File

@@ -33,6 +33,7 @@ goog.provide('Blockly.ContextMenu');
goog.require('Blockly.Events.BlockCreate');
goog.require('Blockly.utils');
goog.require('Blockly.utils.uiMenu');
goog.require('Blockly.Xml');
goog.require('goog.events');
goog.require('goog.math.Coordinate');

View File

@@ -90,7 +90,7 @@ Blockly.FieldVariable.prototype.init = function() {
}
Blockly.FieldVariable.superClass_.init.call(this);
// TODO (1010): Change from init/initModel to initView/initModel
// TODO (#1010): Change from init/initModel to initView/initModel
this.initModel();
};

View File

@@ -35,6 +35,7 @@ goog.require('Blockly.Gesture');
goog.require('Blockly.Touch');
goog.require('Blockly.utils');
goog.require('Blockly.WorkspaceSvg');
goog.require('Blockly.Xml');
goog.require('goog.math.Rect');

View File

@@ -355,7 +355,7 @@ Blockly.inject.bindDocumentEvents_ = function() {
if (goog.userAgent.IPAD) {
Blockly.bindEventWithChecks_(window, 'orientationchange', document,
function() {
// TODO(#397): Fix for multiple blockly workspaces.
// TODO (#397): Fix for multiple Blockly workspaces.
Blockly.svgResize(Blockly.getMainWorkspace());
});
}

View File

@@ -26,6 +26,8 @@
goog.provide('Blockly.Options');
goog.require('Blockly.Xml');
/**
* Parse the user-specified options, using reasonable defaults where behaviour

View File

@@ -432,7 +432,8 @@ Blockly.utils.checkMessageReferences = function(message) {
var msgTable = Blockly.Msg;
// TODO(#1169): Implement support for other string tables, prefixes other than BKY_.
// TODO (#1169): Implement support for other string tables,
// prefixes other than BKY_.
var regex = /%{(BKY_[A-Z][A-Z0-9_]*)}/gi;
var match = regex.exec(message);
while (match) {

View File

@@ -34,6 +34,7 @@ goog.require('Blockly.Blocks');
goog.require('Blockly.constants');
goog.require('Blockly.VariableModel');
goog.require('Blockly.Workspace');
goog.require('Blockly.Xml');
goog.require('goog.string');

View File

@@ -33,6 +33,7 @@ goog.require('Blockly.constants');
goog.require('Blockly.VariableModel');
// TODO Fix circular dependencies
// goog.require('Blockly.Workspace');
goog.require('Blockly.Xml');
Blockly.VariablesDynamic.onCreateVariableButtonClick_String = function(button) {

View File

@@ -1052,7 +1052,7 @@ Blockly.WorkspaceSvg.prototype.pasteWorkspaceComment_ = function(xmlComment) {
commentX = -commentX;
}
// Offset workspace comment.
// TODO: #1719 properly offset comment such that it's not interfereing
// TODO (#1719): Properly offset comment such that it's not interfering
// with any blocks.
commentX += 50;
commentY += 50;

View File

@@ -195,7 +195,7 @@ Blockly.Events.CommentCreate.prototype.type = Blockly.Events.COMMENT_CREATE;
* Encode the event as JSON.
* @return {!Object} JSON representation.
*/
// TODO(#1266): "Full" and "minimal" serialization.
// TODO (#1266): "Full" and "minimal" serialization.
Blockly.Events.CommentCreate.prototype.toJson = function() {
var json = Blockly.Events.CommentCreate.superClass_.toJson.call(this);
json['xml'] = Blockly.Xml.domToText(this.xml);
@@ -268,7 +268,7 @@ Blockly.Events.CommentDelete.prototype.type = Blockly.Events.COMMENT_DELETE;
* Encode the event as JSON.
* @return {!Object} JSON representation.
*/
// TODO(#1266): "Full" and "minimal" serialization.
// TODO (#1266): "Full" and "minimal" serialization.
Blockly.Events.CommentDelete.prototype.toJson = function() {
var json = Blockly.Events.CommentDelete.superClass_.toJson.call(this);
return json;
@@ -357,7 +357,7 @@ Blockly.Events.CommentMove.prototype.setOldCoordinate = function(xy) {
* Encode the event as JSON.
* @return {!Object} JSON representation.
*/
// TODO(#1266): "Full" and "minimal" serialization.
// TODO (#1266): "Full" and "minimal" serialization.
Blockly.Events.CommentMove.prototype.toJson = function() {
var json = Blockly.Events.CommentMove.superClass_.toJson.call(this);
if (this.newCoordinate_) {

View File

@@ -35,10 +35,11 @@ goog.provide('Blockly.Xml.utils');
* Create DOM element for XML.
* @param {string} tagName Name of DOM element.
* @return {!Element} New DOM element.
* @package
*/
Blockly.Xml.utils.createElement = function(tagName) {
// TODO: Namespace this element.
// TODO: Support node.js.
// TODO (#1978): Namespace this element.
// TODO (#2082): Support node.js.
return document.createElement(tagName);
};
@@ -46,9 +47,10 @@ Blockly.Xml.utils.createElement = function(tagName) {
* Create text element for XML.
* @param {text} text Text content.
* @return {!Node} New DOM node.
* @package
*/
Blockly.Xml.utils.createTextNode = function(text) {
// TODO: Support node.js.
// TODO (#2082): Support node.js.
return document.createTextNode(text);
};
@@ -58,6 +60,7 @@ Blockly.Xml.utils.createTextNode = function(text) {
* @param {string} text XML string.
* @return {!Element} The DOM document.
* @throws if XML doesn't parse.
* @package
*/
Blockly.Xml.utils.textToDomDocument = function(text) {
var oParser = new DOMParser();
@@ -69,9 +72,10 @@ Blockly.Xml.utils.textToDomDocument = function(text) {
* Currently the text format is fairly ugly: all one line with no whitespace.
* @param {!Element} dom A tree of XML elements.
* @return {string} Text representation.
* @package
*/
Blockly.Xml.utils.domToText = function(dom) {
// TODO: Support node.js.
// TODO (#2082): Support node.js.
var oSerializer = new XMLSerializer();
return oSerializer.serializeToString(dom);
};