Skip to content

Commit

Permalink
Merge pull request #5 from netsage-project/SankeyNodesDragFix
Browse files Browse the repository at this point in the history
NodeDrag fix
  • Loading branch information
MaheshKhanal authored Jan 28, 2020
2 parents 4b20fdd + f3c9d31 commit 7aee8bc
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
46 changes: 23 additions & 23 deletions src/css/sankey.css
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
.node rect {
cursor: move;
fill-opacity: .9;
shape-rendering: crispEdges;
/* cursor: move;*/
fill-opacity: .9;
shape-rendering: crispEdges;
}

.node-label{
text-transform: capitalize;
pointer-events: none;
/*text-shadow: 0 1px 0 #fff;*/
font-size: 1.2em;
font-weight: bold;
fill: #303030;
.node-label {
text-transform: capitalize;
pointer-events: none;
/*text-shadow: 0 1px 0 #fff;*/
font-size: 1.2em;
font-weight: bold;
fill: #303030;
}
.node text {
pointer-events: none;
text-shadow: 0 1px 0 #fff;
pointer-events: none;
text-shadow: 0 1px 0 #fff;
}

.link {
fill: none;
stroke: #000;
stroke-opacity: .4;
fill: none;
stroke: #000;
stroke-opacity: .4;
}
.link-highlight{
/*stroke-opacity: .8;*/
stroke-opacity: 1;
border-top: 2px solid black;
border-bottom: 2px solid black;
/*stroke: #f8ae63;*/
/*stroke: #FF8000;*/
.link-highlight {
/*stroke-opacity: .8;*/
stroke-opacity: 1;
border-top: 2px solid black;
border-bottom: 2px solid black;
cursor: default;
/*stroke: #f8ae63;*/
/*stroke: #FF8000;*/
}

16 changes: 8 additions & 8 deletions src/netsage_sankey.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,14 +639,14 @@ export class NetSageSankey extends MetricsPanelCtrl {
.attr("transform", function (d) {
return "translate(" + d.x + "," + d.y + ")";
})
.call(d3.behavior.drag()
.origin(function (d) {
return d;
})
.on("dragstart", function () {
this.parentNode.appendChild(this);
})
.on("drag", dragmove))
//.call(d3.behavior.drag()
// .origin(function (d) {
// return d;
//})
//.on("dragstart", function () {
// this.parentNode.appendChild(this);
//})
//.on("drag", dragmove))
.on('mouseover', function (event) {
let hl = [];
_.forEach(event.sourceLinks, function (sl) {
Expand Down

0 comments on commit 7aee8bc

Please sign in to comment.