INNER CODE UNIT · JavaScript

previousNodeIndex

AscensionGameDev/Intersect-Engine · Intersect.Server/wwwroot/js/assets.js:672

			const previousNodeIndex = nodeIndex - 1;
			const previousNode = nodes[previousNodeIndex] ?? null;
			const previousElement = previousNode === null ? null : (this.#rows.find(r => r.getAttribute('data-id') === previousNode.id) ?? null);
			const nextElement = previousElement?.nextElementSibling;

			const row = this.#rowTemplate.content.cloneNode(true).querySelector('tr');
			row.setAttribute('data-id', id);
			row.setAttribute('data-parent-id', parentId);
			row.setAttribute('data-type', Type);
			updateRow(row, node);

			this.#tableBody.insertBefore(row, nextElement);
			this.#rows.push(row);

			const parentPath = decodeURIComponent(parentId);
			if (parentPath === '' || this.#expanded.includes(parentPath)) {
				row.removeAttribute('data-parent-collapsed');
			} else {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…