Skip to content

Commit 524d0f7

Browse files
committed
cherry pick eisman#24 manually
1 parent 35849a0 commit 524d0f7

File tree

6 files changed

+48
-27
lines changed

6 files changed

+48
-27
lines changed

dist/js/neo4jd3.js

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/neo4jd3.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/d3.min.js

Lines changed: 2 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/neo4jd3.js

Lines changed: 29 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/neo4jd3.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/scripts/neo4jd3.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,12 @@ function Neo4jD3(_selector, _options) {
689689
return icons[icons.length * Math.random() << 0];
690690
}
691691

692+
function resetWithNeo4jData(neo4jData) {
693+
// Call the init method again with new data
694+
var newOptions = Object.assign(_options, { neo4jData: neo4jData, neo4jDataUrl: undefined });
695+
init(_selector, newOptions);
696+
}
697+
692698
function rotate(cx, cy, x, y, angle) {
693699
var radians = (Math.PI / 180) * angle,
694700
cos = Math.cos(radians),
@@ -967,6 +973,7 @@ function Neo4jD3(_selector, _options) {
967973
appendRandomDataToNode: appendRandomDataToNode,
968974
neo4jDataToD3Data: neo4jDataToD3Data,
969975
randomD3Data: randomD3Data,
976+
resetWithNeo4jData: resetWithNeo4jData,
970977
size: size,
971978
updateWithD3Data: updateWithD3Data,
972979
updateWithNeo4jData: updateWithNeo4jData,

0 commit comments

Comments
 (0)