اتصالات سطح بالا، اتصالات سطح بالا

بلوک‌ها سه اتصال دارند که استفاده از آنها اختیاری است.

اتصالات بیانیه

Users can create sequences of blocks using the nextStatement and previousStatement connectors. In Blockly's standard layout, these connections are on the top and the bottom, with the blocks stacked vertically.

A block with a previous connector cannot have an output connector . The term statement block refers to a block with no output connector. A statement block will usually have both a previous connection and a next connection.

می‌توان از اتصالات nextStatement و previousStatement استفاده کرد ، اما این ویژگی توسط بلوک‌های استاندارد مورد استفاده قرار نمی‌گیرد.

اتصال بعدی

Creates a point at the bottom of the block, so that other statements can be stacked below it. A block with a next connection but no previous connection usually represents an event, and can be configured to render with a hat .

یک بلوک بدون فیلد و یک تب در پایین.

جی‌سون

تایپ نشده:

{
  ...,
  "nextStatement": null,
}

تایپ شده ( نادر ):

{
  "nextStatement": "Action",
  ...
}

جاوا اسکریپت

تایپ نشده:

this.setNextStatement(true);  // false implies no next connector, the default

تایپ شده (نادر):

this.setNextStatement(true, 'Action');

اتصال قبلی

یک بریدگی در بالای بلوک ایجاد می‌کند، به طوری که می‌توان آن را به صورت یک پشته از دستورات به هم متصل کرد.

بلوک‌هایی که اتصال قبلی دارند، نمی‌توانند اتصال خروجی داشته باشند.

بلوکی بدون مزرعه و یک بریدگی در بالای آن.

جی‌سون

تایپ نشده:

{
  ...,
  "previousStatement": null,
}

تایپ شده ( نادر ):

{
  "previousStatement": "Action",
  ...
}

جاوا اسکریپت

تایپ نشده:

this.setPreviousStatement(true);  // false implies no previous connector, the default

تایپ شده (نادر):

this.setPreviousStatement(true, 'Action');

اتصال خروجی

A block may have a single output connection, represented as a male jigsaw connector on the leading edge. Outputs connect to value inputs. Blocks with an output are usually called value blocks .

یک بلوک بدون میدان و یک رابط پازل نر در لبه سمت چپ.

جی‌سون

تایپ نشده:

{
  // ...,
  "output": null,
}

تایپ شده:

{
  // ...,
  "output": "Number",
}

جاوا اسکریپت

تایپ نشده:

init: function() {
  // ...
  this.setOutput(true);
}

تایپ شده:

init: function() {
  // ...
  this.setOutput(true, 'Number');
}

بلوک‌هایی که دارای کانکتور خروجی هستند نیز نمی‌توانند دارای بریدگی وضعیت قبلی باشند.