/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
// Build up our label UI as an array of each label piece, which is either a // string or a frame, and separators in between them.
assert(!!item.label.length, "Our label should not be empty"); const label = Array(item.label.length * 2 - 1);
label.fill(undefined);
for (let i = 0, length = item.label.length; i < length; i++) { const piece = item.label[i]; const key = `${item.nodeId}-label-${i}`;
// `i` is the index of the label piece we are rendering, `label[i*2]` is // where the rendered label piece belngs, and `label[i*2+1]` (if it isn't // out of bounds) is where the separator belongs.
// If this is not the last piece of the label, add a separator. if (i < length - 1) {
label[i * 2 + 1] = Separator({ key: `${item.nodeId}-separator-${i}` });
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.