{"id":15760594,"url":"https://github.com/mshafir/ember-cli-force-layout","last_synced_at":"2025-04-30T23:13:13.423Z","repository":{"id":31272495,"uuid":"34834311","full_name":"mshafir/ember-cli-force-layout","owner":"mshafir","description":"An ember component for a D3 Force Layout Graph","archived":false,"fork":false,"pushed_at":"2015-10-07T02:46:27.000Z","size":1820,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-17T23:00:09.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mshafir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-30T04:35:01.000Z","updated_at":"2018-08-29T15:56:13.000Z","dependencies_parsed_at":"2022-09-01T20:01:26.348Z","dependency_job_id":null,"html_url":"https://github.com/mshafir/ember-cli-force-layout","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshafir%2Fember-cli-force-layout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshafir%2Fember-cli-force-layout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshafir%2Fember-cli-force-layout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mshafir%2Fember-cli-force-layout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mshafir","download_url":"https://codeload.github.com/mshafir/ember-cli-force-layout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251267692,"owners_count":21561910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-04T10:59:08.277Z","updated_at":"2025-04-30T23:13:13.371Z","avatar_url":"https://github.com/mshafir.png","language":"JavaScript","readme":"# Ember-cli-d3-force-layout\n\nAn ember component for an interactive graph\n\n## Usage\n### Template\n\n```\n{{force-layout-graph\n    charge={{!-- how much nodes repel/attract each other, default: -1000 --}}\n    linkDistance={{!-- distance of links between nodes, default: 50 --}}\n    gravity={{!-- tendency of nodes to move toward center, default: 0.1 --}}\n    nodes={{!-- list of node objects (see below) --}}\n    links={{!-- list of link objects (see below) --}}\n    editable={{!-- whether the graph is in edit mode (allow creating new nodes and links) --}}\n    addedNode={{!-- action fired when a new node gets added in edit mode --}}\n    removedNode={{!-- action fired when a node is removed in edit mode --}}\n    addedLink={{!-- action fired when a link is added in edit mode --}}\n    removedLink={{!-- action fired when a link is removed in edit mode --}}\n    selectedLink={{!-- action fired when a link is selected --}}\n    selectedNode={{!-- action fired when a node is selected --}}\n }}\n```\n\n### Data\nNodes and Lists are specified as a lists (or ember array) of objects as follows:\n\n```\nthis.set('nodes', [{ name: 'node1' }, { name: 'node2' }]);\nthis.set('links', [{ source: 'node1', target: 'node2', type: 'cool-link'}]);`\n```\n\n### Actions\nThe following is basic handling of node/link additions/removals\n\n```\n // In your controller\n actions: {\n   addedNode(node) {\n     this.get('nodes'.pushObject(node);\n   },\n   addedLink(link) {\n     this.get('links').pushObject(link);\n   },\n   removedNode(nodeIndex) {\n     this.get('nodes').removeAt(nodeIndex);\n   },\n   removedLink(linkIndex) {\n     this.get('links').removeAt(linkIndex);\n   }\n }\n```\n\n## Collaborating\n\n### Installation\n\n* `git clone` this repository\n* `npm install`\n* `bower install`\n\n### Running\n\n* `ember server`\n* Visit your app at http://localhost:4200.\n\n### Running Tests\n\n* `ember test`\n* `ember test --server`\n\n### Building\n\n* `ember build`\n\nFor more information on using ember-cli, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmshafir%2Fember-cli-force-layout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmshafir%2Fember-cli-force-layout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmshafir%2Fember-cli-force-layout/lists"}