Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Apr 20, 2023
1 parent 560f687 commit 26071ec
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 16 deletions.
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,24 @@ BEFORE YOU SUBMIT make sure you've done the following:
More details on contributing can be found in CONTRIBUTING.md in the root of this repository. Thank you for your time and interest in the Neo4j Browser!
-->

Changelog
---------

### Added

### Changed

### Deprecated

### Removed

### Fixed

### Security

Checklist
---------

* [ ] Test
* [ ] Self-review
* [ ] Documentation
5 changes: 3 additions & 2 deletions .github/workflows/release-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
name: Release

"on":
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- master

jobs:
release-documentation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const drawArc = function (radius: number, itemNumber: number, width = 30) {
.padAngle(0.03)
}

const getSelectedNode = (node: NodeModel) => (node.selected ? [node] : [])

const attachContextEvent = (
eventType: string,
elements: [
Expand Down Expand Up @@ -77,18 +79,10 @@ const attachContextEvent = (
}

/**
* This function gets triggered when {@link !getSelectedNode} evaluates to true, i.e. only "mouse-clicked" node will
* have the menu rendering
* executed
* @param selection
* @param viz
* @param eventType
* @param itemIndex
* @param className
* @param position
* @param svgIconKey
* @param tooltip
* @returns
* When a node is clicked, this function is triggered.
*
* There is a D3 data join in this function that only binds visual element when {@link !getSelectedNode} evaluates to
* true, i.e. only "mouse-clicked" node will have the menu rendering executed
*/
const createMenuItem = function (
selection: Selection<SVGGElement, NodeModel, BaseType, unknown>,
Expand Down Expand Up @@ -162,8 +156,6 @@ const createMenuItem = function (
return icon
}

const getSelectedNode = (node: NodeModel) => (node.selected ? [node] : [])

const donutRemoveNode = new Renderer<NodeModel>({
name: 'donutRemoveNode',
onGraphChange(selection, viz) {
Expand Down

0 comments on commit 26071ec

Please sign in to comment.