Documentation ¶
Overview ¶
An entry in Cytoscape.js Style object
Index ¶
- Constants
- type ArrowShapeConverter
- type CyJS
- type CyJSEdge
- type CyJSNode
- type Elements
- type LineStyleConverter
- type Position
- type PositionConverter
- type SelectorEntry
- type ShapeConverter
- type TransparencyConverter
- type ValueConverter
- type VisualMappingGenerator
- func (vmGenerator VisualMappingGenerator) CreateContinuousMappings(vpName string, vpCytoscape string, vpDataType string, definition string, ...) []SelectorEntry
- func (vmGenerator VisualMappingGenerator) CreateDiscreteMappings(vpName string, vpCytoscape string, definition string, selectorType string) []SelectorEntry
- func (vmGenerator VisualMappingGenerator) CreatePassthroughMapping(vpName string, definition string, entry *SelectorEntry)
- type VisualPropConverter
Constants ¶
View Source
const ( Id = "id" Source = "source" Target = "target" Interaction = "interaction" )
Tags used in Cytoscape.js JSON
View Source
const ( NW = "NW" N = "N" NE = "NE" W = "W" C = "C" E = "E" SW = "SW" S = "S" SE = "SE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrowShapeConverter ¶
type ArrowShapeConverter struct {
// contains filtered or unexported fields
}
func NewArrowShapeConverter ¶
func NewArrowShapeConverter() *ArrowShapeConverter
func (ArrowShapeConverter) Convert ¶
func (conv ArrowShapeConverter) Convert(value string) interface{}
type CyJS ¶
type CyJS struct { Data map[string]interface{} `json:"data"` Elements Elements `json:"elements"` Style []SelectorEntry `json:"style"` CxData map[string]interface{} `json:"cxData,omitempty"` }
Cytoscape.js Network Object
type CyJSEdge ¶
type CyJSEdge struct { Data map[string]interface{} `json:"data"` Selected bool `json:"selected,omitempty"` }
Edge Object
type CyJSNode ¶
type CyJSNode struct { Data map[string]interface{} `json:"data"` Position Position `json:"position,omitempty"` Selected bool `json:"selected"` }
Node Object
type LineStyleConverter ¶
type LineStyleConverter struct {
// contains filtered or unexported fields
}
func NewLineStyleConverter ¶
func NewLineStyleConverter() *LineStyleConverter
func (LineStyleConverter) Convert ¶
func (conv LineStyleConverter) Convert(value string) interface{}
type PositionConverter ¶
type PositionConverter struct { }
func NewPositionConverter ¶
func NewPositionConverter() *PositionConverter
func (PositionConverter) Convert ¶
func (conv PositionConverter) Convert(value string) interface{}
type SelectorEntry ¶
type ShapeConverter ¶
type ShapeConverter struct {
// contains filtered or unexported fields
}
func NewShapeConverter ¶
func NewShapeConverter() *ShapeConverter
func (ShapeConverter) Convert ¶
func (conv ShapeConverter) Convert(value string) interface{}
type TransparencyConverter ¶
type TransparencyConverter struct{}
func NewTransparencyConverter ¶
func NewTransparencyConverter() *TransparencyConverter
func (TransparencyConverter) Convert ¶
func (conv TransparencyConverter) Convert(value string) interface{}
type ValueConverter ¶
type ValueConverter interface { // Convert Cytoscape VP string value into Cyjs prop. Convert(value string) interface{} }
type VisualMappingGenerator ¶
type VisualMappingGenerator struct {
VpConverter VisualPropConverter
}
func (VisualMappingGenerator) CreateContinuousMappings ¶
func (vmGenerator VisualMappingGenerator) CreateContinuousMappings( vpName string, vpCytoscape string, vpDataType string, definition string, selectorType string, depList map[string]interface{}) []SelectorEntry
Continuous Mapping Converter
func (VisualMappingGenerator) CreateDiscreteMappings ¶
func (vmGenerator VisualMappingGenerator) CreateDiscreteMappings( vpName string, vpCytoscape string, definition string, selectorType string) []SelectorEntry
Create selectors for each key-value pair of discrete mapping.
func (VisualMappingGenerator) CreatePassthroughMapping ¶
func (vmGenerator VisualMappingGenerator) CreatePassthroughMapping( vpName string, definition string, entry *SelectorEntry)
Passthrough Mapping converter.
type VisualPropConverter ¶
type VisualPropConverter struct {
// contains filtered or unexported fields
}
func NewVisualPropConverter ¶
func NewVisualPropConverter(typeTable map[string]string) *VisualPropConverter
func (VisualPropConverter) GetCyjsPropertyValue ¶
func (vpConverter VisualPropConverter) GetCyjsPropertyValue(key string, value string) (converted interface{})
Click to show internal directories.
Click to hide internal directories.