Skip to content

@graphty/graphty-element / session / HistoryCode

Type Alias: HistoryCode ​

HistoryCode = "algo.run" | "algo.legacy" | "algo.remove" | "algo.move" | "algo.batch" | "algo.template" | "batch" | "data.add-nodes" | "data.add-edges" | "data.remove-nodes" | "data.remove-edges" | "data.edit" | "data.clear" | "data.set" | "data.replace-nodes" | "data.replace-edges" | "data.import" | "data.import-source" | "data.expand" | "data.source-expand" | "data.collapse" | "data.declare" | "data.set-source" | "data.label" | "data.set-file-styles" | "style.add-layer" | "style.update-layer" | "style.remove-layer" | "style.move-layer" | "style.remove-layers" | "style.highlight" | "style.fix-channel" | "style.encode" | "style.template" | "style.suggested" | "style.add-folder" | "style.rename-row" | "style.move-row" | "style.pin-row" | "style.lock-row" | "style.hide-row" | "style.delete-row" | "style.restore-starting-rows" | "visibility.filter" | "visibility.clear-filter" | "visibility.window" | "visibility.clear-window" | "visibility.show-context" | "visibility.hide-context" | "visibility.step-add" | "visibility.step-edit" | "visibility.step-on" | "visibility.step-off" | "visibility.step-remove" | "visibility.steps" | "set.create" | "set.rename" | "set.redefine" | "set.members" | "set.remove" | "set.restore" | "note.add" | "note.update" | "note.remove" | "note.merge" | "view.save" | "view.remove" | "view.dimension" | "view.immersive" | "config.set" | "positions.set" | "positions.pin" | "positions.release" | "node.drag" | "layout.set" | "layout.behavior" | "layout.scope" | "layout.whole-graph" | "project.open" | "document.open" | "transaction"

Defined in: graphty-element/src/session/types.ts:2167

What a history step did, as the code of its HistoryStep.fact. The application words it; graphty-element writes no sentence for it. Each code's params:

CodeParams
algo.run, algo.legacyalgorithm: the algorithm's key
algo.remove, algo.moverun: the run's id; algorithm: its algorithm, or null when unknown
algo.batchlabel: the name runs.batch was given, or null; count: how many runs
algo.templatenone: the runs a style template asks for
batchlabel: the batch's own label, or null; steps: how many commands
data.add-nodes, data.add-edges, data.remove-nodes, data.remove-edgescount
data.edittarget: "node" or "edge"; count: how many rows
data.clear, data.set, data.replace-nodes, data.replace-edgesnone
data.importname: the source's name (given, file or URL), or null; type: the data source, or null
data.import-sourcesource: the network source's id; name: what the reader called the data, or null
data.expandnode: the id expanded
data.source-expandseeds: the ids expanded; nodes, edges: how many rows came (experimental)
data.collapsenode: the id collapsed; nodes: how many nodes went (experimental)
data.declarekind: "node" or "edge"; column: the column's name
data.set-sourcename: the source's name, or null
data.labelpath: the value path; value: the value named; label: its name, or null when it was removed
data.set-file-stylesloads: how many loads' style values are kept
style.add-layer, style.remove-layer, style.move-layerlayer: its name, or its id
style.update-layerlayer: its name, or its id; channels: the channels whose set value or binding changed (empty when only another key did)
style.remove-layerscount
style.highlightrun: the run highlighted
style.fix-channelchannel; layer: its name, or its id
style.encodechannel; run
style.templatenone
style.suggestedalgorithms: the algorithms whose suggested styles were applied
style.add-foldername: the folder's name
style.rename-rowrow: its name before, or its id; name: the new name
style.move-row, style.delete-rowrow: its name, or its id
style.pin-rowrow: its name, or its id; pin: "top", "bottom" or "none"
style.lock-rowrow: its name, or its id; locked
style.hide-rowrow: its name, or its id; hidden
style.restore-starting-rowsnone
visibility.filterkind: the filter's kind
visibility.clear-filter, visibility.window, visibility.clear-windownone
visibility.show-context, visibility.hide-contextnone
visibility.step-add, visibility.step-edit, visibility.step-on, visibility.step-off, visibility.step-removeid: the filter step's id
visibility.stepsnone: several steps changed at once, or a reorder
set.createname: the set's name, or null
set.renameset: its name before, or its id; name: the new name
set.redefine, set.members, set.remove, set.restoreset: its name, or its id
note.add, note.update, note.removenone
note.mergesource: the merged document's name, or null
view.save, view.removenames: the views
view.dimensiondimension: "2d" or "3d"
view.immersivemode: "vr" or "ar" (a switch to 3D on the way in)
config.setkeys: the setting paths changed
positions.set, positions.pin, positions.releasecount: how many nodes
node.dragnode: the id dragged
layout.setlayout: the layout's id
layout.behaviorlayout: the layout's id
layout.scope, layout.whole-graphnone
project.openname: the project's name, or null
document.opennone
transactionlabel: the label given to session.transaction, or null

New codes may be added in a minor release: word an unknown one generically.