X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Fcomposer%2Fsrc%2Fsrc%2Flibraries%2Fgraph%2FGraphVirtualLinkPaths.js;fp=skyquake%2Fplugins%2Fcomposer%2Fsrc%2Fsrc%2Flibraries%2Fgraph%2FGraphVirtualLinkPaths.js;h=3c93d5b730f4d7674bface74fe5b623bf920c53a;hb=e29efc315df33d546237e270470916e26df391d6;hp=0000000000000000000000000000000000000000;hpb=9c5e457509ba5a1822c316635c6308874e61b4b9;p=osm%2FUI.git diff --git a/skyquake/plugins/composer/src/src/libraries/graph/GraphVirtualLinkPaths.js b/skyquake/plugins/composer/src/src/libraries/graph/GraphVirtualLinkPaths.js new file mode 100644 index 000000000..3c93d5b73 --- /dev/null +++ b/skyquake/plugins/composer/src/src/libraries/graph/GraphVirtualLinkPaths.js @@ -0,0 +1,50 @@ +/** + * Created by onvelocity on 2/15/16. + */ +import ColorGroups from '../ColorGroups' + +/** + * NOTE: WIP this will replace part of the RelationsAndNetworksLayout::drawConnectionPointsAndPaths method. + * + * This class draws the paths between the VLD and the Connection Point it references. + * + */ +export default class GraphVirtualLinkPaths { + + constructor(graph, props) { + this.graph = graph; + this.props = props; + this.containers = []; + } + + addContainers(containers) { + + } + + render() { + + const paths = graph.paths.selectAll('.connection').data(connectionPointRefs, DescriptorModelFactory.containerIdentity); + + paths.enter().append('path'); + + paths.attr({ + 'data-uid': d => { + return d.uid; + }, + 'class': d => { + return 'connection between-' + d.parent.type + '-and-' + d.type; + }, + 'stroke-width': 5, + stroke: ColorGroups.vld.primary, + fill: 'transparent', + d: edge => { + const layout = containerLayouts[edge.parent.type]; + return layout.renderConnectionPath(edge, containerLayouts); + } + }); + + paths.exit().remove(); + + } + +} \ No newline at end of file