Skip to content

@graphty/graphty-element / session / FileStyleOptions

Interface: FileStyleOptions ​

Defined in: graphty-element/src/session/styles/fileStyles/translate.ts:75

How a file's styles are turned into layers: choices another consumer may make differently.

Properties ​

labelLayers? ​

readonly optional labelLayers?: number

Defined in: graphty-element/src/session/styles/fileStyles/translate.ts:93

How many layers label positions may take when the file sets them per element. Label positions are drawn by one layer whatever their number (node.labelLocation), so this caps nothing.

Deprecated ​

Every label position the file sets is drawn; the value is ignored.


lengths? ​

readonly optional lengths?: "file" | "median"

Defined in: graphty-element/src/session/styles/fileStyles/translate.ts:82

How lengths are scaled: "median" (the default) scales every length by one factor, so the file's median node size (by its larger side) is the element's default node size and node sizes, borders, edge widths, label sizes and the stored positions a recommended layout keeps all keep the file's proportions; "file" keeps the file's numbers as they are.


shapes? ​

readonly optional shapes?: Readonly<Record<string, string>>

Defined in: graphty-element/src/session/styles/fileStyles/translate.ts:87

The element shape each 2D node shape of the file is drawn as; FILE_STYLE_SHAPES by default. A shape the table leaves out is not drawn from the file, and the load notes it.


toolDefaults? ​

readonly optional toolDefaults?: boolean

Defined in: graphty-element/src/session/styles/fileStyles/translate.ts:99

Whether a property the file leaves to the program that wrote it gets that program's default (Cytoscape's for CX and sessions, Graphviz's for DOT, Gephi's for GEXF ...), so the graph looks as it does there. True by default.