Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor (dispatcher, labelType, currency, txLabelType) {
super()
this.currency = currency
this.dispatcher = dispatcher
this.labelType = labelType
this.txLabelType = txLabelType
// nodes of the graph
this.entityNodes = map()
this.addressNodes = map()
// ids of addresses/entities present in graph
this.references = {address: map(), entity: map()}
this.adding = set()
this.selectedNode = null
this.highlightedNodes = []
this.layers = []
this.transform = {k: 1, x: 0, y: 0, dx: 0, dy: 0}
this.colorMapCategories = map()
this.colorMapTags = map()
let colorGen = (map, type) => (k) => {
if (!k) return defaultColor[type]
let color = map.get(k)
if (color === undefined) {
color = colorScale(map.size())
map.set(k, color.toString())
super()
this.currency = currency
this.dispatcher = dispatcher
this.labelType = labelType
this.txLabelType = txLabelType
// nodes of the graph
this.entityNodes = map()
this.addressNodes = map()
// ids of addresses/entities present in graph
this.references = {address: map(), entity: map()}
this.adding = set()
this.selectedNode = null
this.highlightedNodes = []
this.layers = []
this.transform = {k: 1, x: 0, y: 0, dx: 0, dy: 0}
this.colorMapCategories = map()
this.colorMapTags = map()
let colorGen = (map, type) => (k) => {
if (!k) return defaultColor[type]
let color = map.get(k)
if (color === undefined) {
color = colorScale(map.size())
map.set(k, color.toString())
}
let c = hsl(color)
c.l = c.l * lightnessFactor[type]
return c
}
this.colors =
{
'entity': {
categories: colorGen(this.colorMapCategories, 'entity'),
constructor () {
this.addresses = map()
this.entities = map()
this.outgoingLinks = map()
this.notesStore = map()
this.tagsStore = map()
}
/**
constructor () {
this.addresses = map()
this.entities = map()
this.outgoingLinks = map()
this.notesStore = map()
this.tagsStore = map()
}
/**
constructor () {
this.addresses = map()
this.entities = map()
this.outgoingLinks = map()
this.notesStore = map()
this.tagsStore = map()
}
/**
constructor (paper, opts, defaults) {
var transitions = map(),
options = {};
forEach(opts, (o, key) => {
if (isObject(o)) transitions.set(key, o);
else options[key] = o;
});
super(paper, options, defaults);
var scope = this.$scope;
scope.transitions = map();
transitions.each((o, key) => {
scope.transitions.set(key, scope.$new().$extend(o));
});
}
/**
constructor (id) {
super()
this.id = id
this.nodes = map()
}
serialize () {
constructor ($location, $q, $http, $log, $timeout, context) {
this.$location = $location;
this.$q = $q;
this.$http = $http;
this.$log = $log;
this.$timeout = $timeout;
this.apis = map();
this.context = context;
}
initOutgoing (id, keyspace) {
if (typeof id !== 'string' && typeof id !== 'number') {
throw new Error('id is not string')
}
let outgoing = this.outgoingLinks.get(prefix(keyspace, id))
if (!outgoing) {
outgoing = map()
this.outgoingLinks.set(prefix(keyspace, id), outgoing)
}
return outgoing
}
linkOutgoing (source, target, keyspace, data) {
export default function Digraph () {
this._nodes = []
this._edges = []
this._dummyNodes = map()
}