mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Collapse the five 0/1-based index flags into one option.
This commit is contained in:
@@ -162,7 +162,7 @@ Blockly.Dart['unittest_adjustindex'] = function(block) {
|
||||
var index = Blockly.Dart.valueToCode(block, 'INDEX',
|
||||
Blockly.Dart.ORDER_ADDITIVE) || '0';
|
||||
// Adjust index if using one-based indexing.
|
||||
if (Blockly.Dart.ONE_BASED_INDEXING) {
|
||||
if (block.workspace.options.oneBasedIndex) {
|
||||
if (Blockly.isNumber(index)) {
|
||||
// If the index is a naked number, adjust it right now.
|
||||
return [parseFloat(index) + 1, Blockly.Dart.ORDER_ATOMIC];
|
||||
|
||||
Reference in New Issue
Block a user