Skip to content

Commit

Permalink
build(deps): Bump d3 to 3.0.0 (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
sasjo authored Aug 9, 2024
1 parent 1577a44 commit a0c6f6a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 19 deletions.
28 changes: 19 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/app/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ module.exports = {
moduleNameMapper: {
'\\.(css|less)$': 'identity-obj-proxy',
'react-markdown': '<rootDir>/../../node_modules/react-markdown/react-markdown.min.js',
'd3-selection': '<rootDir>/../../node_modules/d3-selection/dist/d3-selection.js',
'd3-force': '<rootDir>/../../node_modules/d3-force/dist/d3-force.js',
},
reporters: [
'default',
Expand Down
4 changes: 2 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"dependencies": {
"@react-oauth/google": "^0.12.1",
"@tech-radar/shared": "^0.0.0",
"d3-force": "^2.0.1",
"d3-selection": "^1.4.0",
"d3-force": "^3.0.0",
"d3-selection": "^3.0.0",
"jwt-decode": "^4.0.0",
"launchdarkly-react-client-sdk": "^3.4.0",
"prop-types": "^15.7.2",
Expand Down
16 changes: 8 additions & 8 deletions packages/app/src/js/lib/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export default class SvgRadar {

const { print_layout } = this.config;

// Store all entries so we can search them by ID later.
// Store all entries, so we can search them by ID later.
this.radarEntries = entries;

this.rink.selectAll('*').remove();
Expand Down Expand Up @@ -210,9 +210,9 @@ export default class SvgRadar {
.text(d => `${d.id}. ${d.label}`)
.style('font-family', fontFamily)
.style('font-size', '10')
.on('mouseover', d => { this.showBubble(d); this.highlightLegendItem(d); })
.on('mouseout', d => { this.hideBubble(d); this.unhighlightLegendItem(d); })
.on('click', this.followLink);
.on('mouseover', (e, d) => { this.showBubble(d); this.highlightLegendItem(d); })
.on('mouseout', (e, d) => { this.hideBubble(d); this.unhighlightLegendItem(d); })
.on('click', (e, d) => this.followLink(d));
}
}
}
Expand All @@ -223,9 +223,9 @@ export default class SvgRadar {
.append('g')
.attr('class', 'blip svglink')
.attr('transform', (d, i) => this.legend_transform(d.quadrant, d.ring, i))
.on('mouseover', d => { this.showBubble(d); this.highlightLegendItem(d); })
.on('mouseout', d => { this.hideBubble(d); this.unhighlightLegendItem(d); })
.on('click', this.followLink);
.on('mouseover', (e, d) => { this.showBubble(d); this.highlightLegendItem(d); })
.on('mouseout', (e, d) => { this.hideBubble(d); this.unhighlightLegendItem(d); })
.on('click', (e, d) => this.followLink(d));

// configure each blip
blips.each(function (d) {
Expand Down Expand Up @@ -404,7 +404,7 @@ export default class SvgRadar {
}

showBubble = (d) => {
if (d.active || config.print_layout) {
if (d.active || this.config.print_layout) {
let tooltip = d3.select('#bubble text')
.text(d.label);
let bbox = tooltip.node().getBBox();
Expand Down

0 comments on commit a0c6f6a

Please sign in to comment.