Skip to content

MapperCollection

class

Back to Helios Web API

Kind
class
Source
src/pipeline/Mapper.js:1207

Description

Collection of named mappers for either node or edge visuals.

Signature

export class MapperCollection {

Parameters

NameTypeAttributesDefaultDescription
mode'node'|'edge'Visual target scope.
networkHeliosNetworkSource graph.
onChangeFunctionoptionalCallback invoked when mapper configuration changes.
debugValue passed to constructor.

Returns

Collection with a default mapper.

Type MapperCollection

Notes

Collections let apps keep multiple named mapper presets and combine them before applying visual attributes.

Mappers

Mapper configuration for node and edge visual channels. MappersBehavior handles mapper UI state.

createMapper(name)

Source: src/pipeline/Mapper.js:1265

Configures or reads create mapper.

Parameters

NameTypeAttributesDefaultDescription
namestringAttribute or API identifier.

toCombinedMapper(options = {}) → {Object|this}

Source: src/pipeline/Mapper.js:1288

Merges all registered mappers into a single Mapper (channels override in insertion order).

Parameters

NameTypeAttributesDefaultDescription
optionsObjectoptional{}Options object for this operation.

Returns

Current to combined mapper value when called without arguments; otherwise this instance for chaining.

Type Object|this

Example


helios.toCombinedMapper({
  enabled: true,
});

Configuration

General configuration setters and compatibility helpers.

setDefault(mapper) → {this}

Source: src/pipeline/Mapper.js:1257

Replaces the default mapper.

Parameters

NameTypeAttributesDefaultDescription
mapperMapper

Returns

This instance.

Type this

Utilities

Additional public helpers that do not belong to a narrower API area.

channel(name)

Source: src/pipeline/Mapper.js:1222

Returns a ChannelBuilder bound to the default mapper. Calling .done() will mark the collection dirty.

Parameters

NameTypeAttributesDefaultDescription
namestringAttribute or API identifier.

add(entry, name) → {this}

Source: src/pipeline/Mapper.js:1239

Adds a Mapper instance or a descriptor object describing channels.

Parameters

NameTypeAttributesDefaultDescription
entryMapper | Object
namestringoptional

Returns

This instance.

Type this

buildFromDescriptor(descriptor)

Source: src/pipeline/Mapper.js:1271

Configures or reads build from descriptor.

Parameters

NameTypeAttributesDefaultDescription
descriptorValue passed to buildFromDescriptor.

touch()

Source: src/pipeline/Mapper.js:1313

Configures or reads touch.