{"id":17688433,"url":"https://github.com/wflixu/tgraph","last_synced_at":"2025-05-13T00:47:11.158Z","repository":{"id":44606379,"uuid":"439863313","full_name":"wflixu/tgraph","owner":"wflixu","description":"typescript + mxgraph +vite + vue ","archived":false,"fork":false,"pushed_at":"2024-10-10T04:03:49.000Z","size":3723,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T00:47:01.873Z","etag":null,"topics":["drawio","mxgraph","svg","topology-graph"],"latest_commit_sha":null,"homepage":"https://wflixu.github.io/tgraph/","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/wflixu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-19T12:55:09.000Z","updated_at":"2024-10-10T04:03:53.000Z","dependencies_parsed_at":"2024-10-24T14:25:14.305Z","dependency_job_id":"ddffab77-0399-4480-9083-a0964756484d","html_url":"https://github.com/wflixu/tgraph","commit_stats":{"total_commits":78,"total_committers":2,"mean_commits":39.0,"dds":"0.012820512820512775","last_synced_commit":"517ab985f29f5f5710f35197433fa280b86b63d4"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wflixu%2Ftgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wflixu%2Ftgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wflixu%2Ftgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wflixu%2Ftgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wflixu","download_url":"https://codeload.github.com/wflixu/tgraph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253850874,"owners_count":21973671,"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":["drawio","mxgraph","svg","topology-graph"],"created_at":"2024-10-24T11:44:24.832Z","updated_at":"2025-05-13T00:47:11.136Z","avatar_url":"https://github.com/wflixu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# thgraph\n\n**thgraph** is a modern reimplementation of the mxGraph library, which is no longer actively maintained. Our goal is to refactor the existing jgraph/mxGraph source code into TypeScript, removing legacy browser compatibility code and focusing on modern browsers. Given the extensive codebase, a complete rewrite isn't feasible at this time. Instead, our strategy is to first convert it to ES Modules, allowing compatibility with popular frameworks like Vue, React, and build tools like Vite and Webpack, followed by ongoing refactoring and optimization.\n\nFor the original mxGraph codebase, please visit: [mxgraph repository](https://github.com/jgraph/mxgraph-js).\n\n## Roadmap\n\n- [x] Successfully run the Hello World example\n- [x] Convert to ES Module format\n- [x] Create example website\n- [ ] Continue refactoring\n- [ ] Optimize TypeScript types\n\n## Installation\n\nTo install thgraph, use one of the following package managers:\n\n```bash\n# npm\nnpm install thgraph\n\n# yarn\nyarn add thgraph\n\n# View the application\npnpm dev\n\n# Documentation\npnpm dev:doc\n```\n\n## Documentation\n\nCurrently, thgraph is a direct conversion of mxGraph to ES Modules, allowing previous global variables to be used seamlessly.\n\n[View the new documentation](https://wflixu.github.io/tgraph/).\n\n### Hello World Example\n\nHere’s a simple example of how to use thgraph:\n\n```javascript\nimport { mxGraph, mxRubberband } from 'thgraph';\n\nconst container = document.getElementById('graphContainer');\n// Creates the graph inside the specified container\nconst graph = new mxGraph(container);\n\n// Enables rubberband selection\nnew mxRubberband(graph);\n\n// Gets the default parent for inserting new cells\nconst parent = graph.getDefaultParent();\n\n// Adds cells to the model in a single step\ngraph.getModel().beginUpdate();\ntry {\n    const v1 = graph.insertVertex(parent, null, 'Hello,', 20, 20, 80, 30);\n    const v2 = graph.insertVertex(parent, null, 'World!', 200, 150, 80, 30);\n    const e1 = graph.insertEdge(parent, null, '', v1, v2);\n} finally {\n    // Updates the display\n    graph.getModel().endUpdate();\n}\n```\n\nFor more information, refer to the [mxGraph documentation](https://jgraph.github.io/mxgraph/).\n\n## Contributing\n\nWe welcome contributions to thgraph! Here’s how you can get involved:\n\n1. Fork this repository\n2. Create a new branch named `Feat_xxx`\n3. Commit your changes\n4. Open a Pull Request\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwflixu%2Ftgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwflixu%2Ftgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwflixu%2Ftgraph/lists"}