Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@
"license": "EPL-1.0",
"bugs": {
"url": "https://github.com/Nic30/d3-hwschematic/issues",
"email" : "Nic30original@gmail.com"
"email": "Nic30original@gmail.com"
},
"homepage": "https://github.com/Nic30/d3-hwschematic#readme",
"engines" : {
"npm" : ">=8.5.1",
"node" : ">=12.22.9"
"engines": {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible avoid commiting style changes together with the code changes.
I hope you know about https://code.visualstudio.com/docs/sourcecontrol/staging-commits

"npm": ">=8.5.1",
"node": ">=12.22.9"
},
"dependencies": {
"d3": "^6.5.0",
"elkjs": "^0.8.2"
"d3": "^7.9.0",
"elkjs": "^0.11.1"
},
"devDependencies": {
"@babel/preset-env": "^7.12.1",
Expand All @@ -55,15 +55,20 @@
"coveralls": "^3.1.0",
"eslint": "^7.12.1",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.3",
"jest": "^30.4.2",
"jest-environment-jsdom": "^30.4.1",
"rollup": "^2.33.1",
"rollup-plugin-copy": "^3.3.0",
"run-script-os": "^1.1.3"
},
"jest": {
"testEnvironment": "jsdom",
"transformIgnorePatterns": [
"node_modules/.*"
],
"moduleNameMapper": {
"^d3$": "<rootDir>/node_modules/d3/dist/d3.min.js"
},
"coverageDirectory": "<rootDir>/tests/coverage",
"coveragePathIgnorePatterns": [
"node_modules/"
Expand Down
8 changes: 5 additions & 3 deletions src/elk/elk-d3.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,12 @@ export default class d3elk {
}

terminate() {
if (this.layouter)
this.layouter.terminateWorker();
if (this.layouter) {
try {
this.layouter.terminateWorker();
} catch(e) {}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you set your IDE/autoformat/editor to same style so the whitespaces have same width? I mean for example this line is misaligned.

}
}

/**
* Clean all layout possitions from nodes, nets and ports
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/d3-hwschematic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('Testing scheme rendering', () => {
expect(graphData).not.toBeNull();
return sch.bindData(graphData).then(
() => {
expect(applyLayoutSpy).toBeCalled();
expect(applyLayoutSpy).toHaveBeenCalled();
sch.terminate();
},
(reason) => {
Expand Down