MCPcopy Create free account
hub / github.com/breck7/scroll / toggleLine

Method toggleLine

external/.scrollLibs.js:17417–17424  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

17415 return this.filter(particle => particle.getLine() === line)
17416 }
17417 toggleLine(line) {
17418 const lines = this.getParticlesByLine(line)
17419 if (lines.length) {
17420 lines.map(line => line.destroy())
17421 return this
17422 }
17423 return this.appendLine(line)
17424 }
17425 // todo: remove?
17426 sortByColumns(indexOrIndices) {
17427 const indices = indexOrIndices instanceof Array ? indexOrIndices : [indexOrIndices]

Callers

nothing calls this directly

Calls 4

getParticlesByLineMethod · 0.95
appendLineMethod · 0.95
mapMethod · 0.80
destroyMethod · 0.80

Tested by

no test coverage detected