mirror of
https://github.com/google/blockly.git
synced 2026-01-09 18:10:08 +01:00
Update message descriptions.
This commit is contained in:
@@ -816,7 +816,7 @@ Blockly.Connection.prototype.unhideAll = function() {
|
||||
for (var c = 0; c < connections.length; c++) {
|
||||
renderList.push.apply(renderList, connections[c].unhideAll());
|
||||
}
|
||||
if (renderList.length == 0) {
|
||||
if (!renderList.length) {
|
||||
// Leaf block.
|
||||
renderList[0] = block;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ Blockly.ConnectionDB.prototype.addConnection = function(connection) {
|
||||
* @return The index of the connection, or -1 if the connection was not found.
|
||||
*/
|
||||
Blockly.ConnectionDB.prototype.findConnection = function(conn) {
|
||||
if (this.length == 0) {
|
||||
if (!this.length) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ Blockly.ConnectionDB.prototype.findConnection = function(conn) {
|
||||
* @private
|
||||
*/
|
||||
Blockly.ConnectionDB.prototype.findPositionForConnection_ = function(connection) {
|
||||
if (this.length == 0) {
|
||||
if (!this.length) {
|
||||
return 0;
|
||||
}
|
||||
var pointerMin = 0;
|
||||
|
||||
@@ -85,8 +85,8 @@ Blockly.Events.fire = function(event) {
|
||||
if (!Blockly.Events.isEnabled()) {
|
||||
return;
|
||||
}
|
||||
if (Blockly.Events.FIRE_QUEUE_.length == 0) {
|
||||
// Schedule a firing of the event queue.
|
||||
if (!Blockly.Events.FIRE_QUEUE_.length) {
|
||||
// First event added; schedule a firing of the event queue.
|
||||
setTimeout(Blockly.Events.fireNow_, 0);
|
||||
}
|
||||
Blockly.Events.FIRE_QUEUE_.push(event);
|
||||
|
||||
@@ -670,7 +670,7 @@ Blockly.WorkspaceSvg.prototype.onMouseWheel_ = function(e) {
|
||||
Blockly.WorkspaceSvg.prototype.getBlocksBoundingBox = function() {
|
||||
var topBlocks = this.getTopBlocks();
|
||||
// There are no blocks, return empty rectangle.
|
||||
if (topBlocks.length <= 0) {
|
||||
if (!topBlocks.length) {
|
||||
return {x: 0, y: 0, width: 0, height: 0};
|
||||
}
|
||||
|
||||
|
||||
@@ -250,11 +250,11 @@ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = 'Return true if the first input is great
|
||||
Blockly.Msg.LOGIC_OPERATION_HELPURL = 'https://github.com/google/blockly/wiki/Logic#logical-operations';
|
||||
/// tooltip - See [https://en.wikipedia.org/wiki/Logical_conjunction https://en.wikipedia.org/wiki/Logical_conjunction].
|
||||
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = 'Return true if both inputs are true.';
|
||||
/// block text - See [https://en.wikipedia.org/wiki/Logical_conjunction https://en.wikipedia.org/wiki/Logical_conjunction].
|
||||
/// block text - See [https://en.wikipedia.org/wiki/Logical_conjunction https://en.wikipedia.org/wiki/Logical_conjunction].\n{{Identical|And}}
|
||||
Blockly.Msg.LOGIC_OPERATION_AND = 'and';
|
||||
/// block text - See [https://en.wikipedia.org/wiki/Disjunction https://en.wikipedia.org/wiki/Disjunction].
|
||||
Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = 'Return true if at least one of the inputs is true.';
|
||||
/// block text - See [https://en.wikipedia.org/wiki/Disjunction https://en.wikipedia.org/wiki/Disjunction].
|
||||
/// block text - See [https://en.wikipedia.org/wiki/Disjunction https://en.wikipedia.org/wiki/Disjunction].\n{{Identical|Or}}
|
||||
Blockly.Msg.LOGIC_OPERATION_OR = 'or';
|
||||
|
||||
/// url - Information about logical negation. The translation of [https://en.wikipedia.org/wiki/Logical_negation https://en.wikipedia.org/wiki/Logical_negation] is recommended if it exists in the target language.
|
||||
|
||||
Reference in New Issue
Block a user