-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a project with maxGraph as a lit Web Component (#38)
- Loading branch information
Showing
12 changed files
with
480 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# lit-ts | ||
|
||
Demonstrate how to integrate maxGraph in a Web Component created with [lit](https://lit.dev/). | ||
|
||
The application is built with [Vite](https://vitejs.dev/). | ||
|
||
## Setup | ||
|
||
From the project root, run `npm install`. | ||
|
||
If you want to use the maxGraph development version (built locally), see the README about maxGraph integration. | ||
|
||
## Running the project | ||
|
||
Run `npm run dev` and go to http://localhost:5173/ | ||
|
||
If you want to bundle the application, run `npm run build` and then run `npm run preview` to access to a preview of the | ||
bundle application. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>maxGraph Lit integration example</title> | ||
<link rel="icon" type="image/svg+xml" href="./favicon.svg" /> | ||
<script type="module" src="/src/index.ts"></script> | ||
</head> | ||
<body> | ||
<h1>maxGraph TypeScript example</h1> | ||
<p>Display a test graph. Activated behaviours:</p> | ||
<ul> | ||
<li>Panning: use mouse right button</li> | ||
<li>Cells selection with Rubberband: use mouse left button</li> | ||
</ul> | ||
<maxgraph-graph></maxgraph-graph> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "maxgraph-ts-example-integrating-in-lit", | ||
"private": true, | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc && vite build --base ./", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@maxgraph/core": "0.2.1", | ||
"lit": "~2.7.5" | ||
}, | ||
"devDependencies": { | ||
"vite": "~4.3.9", | ||
"typescript": "~5.1.6" | ||
} | ||
} |
Oops, something went wrong.