MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / toggleFold

Function toggleFold

vulnerablecode/static/js/package_curation.js:275–295  ·  view source on GitHub ↗
(startIdx)

Source from the content-addressed store, hash-verified

273 },
274
275 toggleFold(startIdx) {
276 const foldKey = `${this.currentIndex}-${startIdx}`;
277 const collapseKey = `${this.currentIndex}-${startIdx}-collapsed`;
278
279 if (this.foldAgreementBlocks) {
280 if (this.expandedFolds.has(foldKey)) {
281 this.expandedFolds.delete(foldKey);
282 } else {
283 this.expandedFolds.add(foldKey);
284 }
285 } else {
286 if (this.expandedFolds.has(collapseKey)) {
287 this.expandedFolds.delete(collapseKey);
288 } else {
289 this.expandedFolds.add(collapseKey);
290 }
291 }
292 const item = curationItems[this.currentIndex];
293 const versions = item.all_versions || item.all_version;
294 this.renderBody(item, versions);
295 },
296
297 toggleColumnFold(groupIdx) {
298 const colKey = `${this.currentIndex}-col-${groupIdx}`;

Callers

nothing calls this directly

Calls 2

addMethod · 0.80
deleteMethod · 0.45

Tested by

no test coverage detected