Skip to content

API reference

eles.removeScratch — Collection > Data and scratch. Cytoscape.js signatures, parameters and return contract.

eles.removeScratch — Collection › Data and scratch

Preview · Collection › Data and scratch

Read in the complete API reference · All API members

#eles.removeScratch()

// Remove all keys
eles.removeScratch(): this

Delete scratchpad keys from every element.

Returns this

this collection, for chaining

Example

eles.scratch('temporary', 1);
eles.removeScratch();
console.log(eles.first().scratch('temporary')); // undefined

Example graph and handle setup

#eles.removeScratch(namespace)

// Remove the specified keys
eles.removeScratch(namespace: string): this

Delete scratchpad keys from every element.

Parameters
NameDescription
namespace: string

the key to remove; omit to clear each element's whole scratchpad

Returns this

this collection, for chaining

Example

eles.scratch('temporary', 1);
eles.removeScratch('temporary');
console.log(eles.first().scratch('temporary')); // undefined

Example graph and handle setup