Skip to content

Commit

Permalink
GDB-9236: User Guides stop on Vis Graph segment and block the workbench
Browse files Browse the repository at this point in the history
## What
- visual graph steps where user have click/doubleclick in user guides are broken;
- hierarchy steps where a node is zoomed or focused.

## Why
We updated the d3 library.

## How
Changed behaviour to work with the new version of d3.
  • Loading branch information
boyan-tonchev committed Nov 30, 2023
1 parent 6579226 commit 2686f91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ function GraphsVisualizationsCtrl($scope, $rootScope, $repositories, $licenseSer
}, 1000);
};

const touchEndEventHandler = function (d) {
const touchEndEventHandler = function () {
$timeout.cancel(touchHoldEventTimer);
touchHoldEventTimer = null;
};
Expand Down Expand Up @@ -1738,15 +1738,15 @@ function GraphsVisualizationsCtrl($scope, $rootScope, $repositories, $licenseSer
.on('mouseover', showNodeTipAndIcons)
.on('mouseout', hideTipForNode)
.on("click", clickEventHandler)
.on("touchstart", touchStartEventHandler)
.on("touchstart", (event, d) => touchStartEventHandler(d))
// no need to track move for mouse
.on("touchmove", moveEventHandler)
.on("touchend", touchEndEventHandler)
.on("contextmenu", rightClickHandler)
// custom event used when user is following a guide
.on("gdb-expand-node", expandEventHandler)
.on("gdb-expand-node", (event, d) => expandEventHandler(d, 0, event.srcElement.parentNode))
// custom event used when user is following a guide
.on("gdb-show-node-info", showNodeInfo)
.on("gdb-show-node-info", (event, d) => showNodeInfo(d))
.call(drag);

const nodeLabels = container.selectAll(".node-wrapper").append("foreignObject")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ function classHierarchyDirective($rootScope, $location, GraphDataRestService, $w
}
})
// custom event used when user is following a guide
.on("gdb-focus", doFocus)
.on("gdb-zoom", zoom);
.on("gdb-focus", (event, d) => doFocus(d))
.on("gdb-zoom", (event, d) => zoom(d));


if (flattenedClassNames) {
Expand Down

0 comments on commit 2686f91

Please sign in to comment.