Skip to content
Snippets Groups Projects
Commit c13a1569 authored by AndiMajore's avatar AndiMajore
Browse files

fixed lodash warning message

parent 53e84a1d
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,9 @@
"externals": "replace"
}
},
"allowedCommonJsDependencies": [
"lodash"
],
"outputPath": "dist/netex",
"index": "src/index.html",
"main": "src/main.ts",
......
import { defaultConfig, IConfig } from './config';
import {NodeInteraction, Node, getProteinNodeId, NetexInteraction} from './interfaces';
import * as merge from 'lodash/fp/merge';
import * as merge from 'lodash/fp/merge';
export function getDatasetFilename(dataset: Array<[string, string]>): string {
return `network-${JSON.stringify(dataset).replace(/[\[\]\",]/g, '')}.json`;
......@@ -66,10 +66,10 @@ export class ProteinNetwork {
/** Maps user input node to network node object
* If user input node has no group, fall back to default
* If user input node has group that is not defined, throw error
*
* @param customNode
* @param config
* @returns
*
* @param customNode
* @param config
* @returns
*/
export function mapCustomNode(customNode: any, config: IConfig): Node {
let node;
......@@ -94,10 +94,10 @@ export class ProteinNetwork {
/** Maps user input edge to network edge object
* If user input edge has no group, fall back to default
* If user input edge has group that is not defined, throw error
*
* @param customEdge
* @param config
* @returns
*
* @param customEdge
* @param config
* @returns
*/
export function mapCustomEdge(customEdge: NodeInteraction, config: IConfig): any {
let edge;
......@@ -120,10 +120,10 @@ export function mapCustomEdge(customEdge: NodeInteraction, config: IConfig): any
/** Maps netex retrieved edge to network edge object
* Uses the default group for edge objects.
*
* @param customEdge
* @param config
* @returns
*
* @param customEdge
* @param config
* @returns
*/
export function mapNetexEdge(customEdge: NetexInteraction, config: IConfig): any {
const edge = JSON.parse(JSON.stringify(config.edgeGroups.default));
......
......@@ -3,7 +3,7 @@ import {
Node,
} from './interfaces';
import { IConfig, defaultConfig} from './config';
import * as merge from 'lodash/fp/merge';
import * as merge from 'lodash/fp/merge';
export class NetworkSettings {
......@@ -92,7 +92,7 @@ export class NetworkSettings {
static getColor(color: 'protein' | 'approvedDrug' | 'unapprovedDrug' | 'hostFont' | 'drugFont' |
'nonSeedHost' | 'selectedForAnalysis' | 'selectedForAnalysisText' |
'edgeHostDrug' | 'edgeHostDrugHighlight' | 'edgeGeneGene' | 'edgeGeneGeneHighlight')
'edgeHostDrug' | 'edgeHostDrugHighlight' | 'edgeGeneGene' | 'edgeGeneGeneHighlight')
/**
* Collection of all colors per use-case
*/
......@@ -134,7 +134,7 @@ export class NetworkSettings {
} else {
node = merge(node, config.nodeGroups[node.group]);
}
// note that seed and selected node style are applied after the node style is fetched.
// note that seed and selected node style are applied after the node style is fetched.
// this allows to overwrite only attributes of interest, therefor in e.g. seedNode group
// certain attributes like shape can remain undefined
// use lodash merge to not lose deep attributes, e.g. "font.size"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment