-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update dependency node to v18.17.1 (#56) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency tslib to v2.6.1 (#57) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency @testing-library/jest-dom to v5.17.0 (#54) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency @next/bundle-analyzer to v13 (#58) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency @types/node to v18.17.4 (#55) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alexander Milevski <[email protected]> * Update dependency prettier to v3 (#59) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alexander Milevski <[email protected]> * Update dependency prettier to v3.0.3 (#63) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency tslib to v2.6.2 (#64) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update react monorepo (#65) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency @next/bundle-analyzer to v13.5.6 (#66) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency @testing-library/user-event to v14.5.1 (#67) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency node to v18.18.2 (#68) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency @types/node to v18.18.9 (#61) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency gh-pages to v6 (#70) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency leaflet to v1.9.4 (#62) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency dts-bundle-generator to v8.1.2 (#73) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency @next/bundle-analyzer to v14 (#74) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency @testing-library/react to v14.1.0 (#72) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency @types/lodash.throttle to v4.1.9 (#71) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Dependencies update, exposed new APIs (#77) * New build system, updating ogma and react * Exposed two more layer APIs, fixed the tests, moved to vite for the build * Removed typehead, fixed types * Scripts and version * gh-pages directory update * web -> demo * Trying to fix the coverage reports * Fixed the react 18 mode * Fixed the typings * added docs for new Layer and Overlay --------- Co-authored-by: Alexander Milevski <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
- Loading branch information
1 parent
0dc16ae
commit b2b8f76
Showing
55 changed files
with
5,183 additions
and
1,865 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 4.3.3 | ||
current_version = 4.6.0 | ||
commit = False | ||
tag = False | ||
serialize = | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
18.16.1 | ||
18.18.2 |
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 |
---|---|---|
@@ -1 +1 @@ | ||
4.3.3 | ||
4.6.0 |
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>React Ogma; component</title> | ||
<link href="index-bundle.css" rel="stylesheet" /> | ||
<title>React Ogma component</title> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css" | ||
/> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script src="index-bundle.js" type="module"></script> | ||
<script src="index.tsx" type="module"></script> | ||
</body> |
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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import { createRoot } from "react-dom/client"; | ||
import "./src/index.css"; | ||
import App from "./src/App"; | ||
import { GeistProvider, CssBaseline } from "@geist-ui/core"; | ||
|
||
ReactDOM.render( | ||
const container = document.getElementById("root")!; | ||
const root = createRoot(container); | ||
|
||
root.render( | ||
<React.StrictMode> | ||
<GeistProvider> | ||
<CssBaseline /> | ||
<App /> | ||
</GeistProvider> | ||
</React.StrictMode>, | ||
document.getElementById("root") | ||
</React.StrictMode> | ||
); |
File renamed without changes
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
File renamed without changes.
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
11 changes: 7 additions & 4 deletions
11
web/src/components/Layout.tsx → demo/src/components/Layout.tsx
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
File renamed without changes.
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,8 @@ | ||
.position-control__container { | ||
position: absolute; | ||
top: 15px; | ||
left: 20em; | ||
color: #888; | ||
padding: 0.5em; | ||
font-size: x-small; | ||
} |
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,36 @@ | ||
import { Point, Layer as OgmaLayer } from "@linkurious/ogma"; | ||
import { useEffect, useState, useCallback, useRef } from "react"; | ||
import { useOgma, Layer } from "../../../src"; | ||
import "./MousePosition.css"; | ||
|
||
export const MousePosition = () => { | ||
const ogma = useOgma(); | ||
const [position, setPosition] = useState<Point>({ x: 0, y: 0 }); | ||
const layerRef = useRef<OgmaLayer>(null); | ||
|
||
const requestSetPosition = useCallback( | ||
(pos: Point) => { | ||
requestAnimationFrame(() => setPosition(pos)); | ||
}, | ||
[setPosition] | ||
); | ||
|
||
useEffect(() => { | ||
const listener = () => { | ||
const { x, y } = ogma.getPointerInformation(); | ||
requestSetPosition({ x, y }); | ||
}; | ||
ogma.events.on("mousemove", listener); | ||
return () => { | ||
ogma.events.off(listener); | ||
}; | ||
}, [ogma]); | ||
|
||
return ( | ||
<Layer className="position-control" ref={layerRef}> | ||
<div className="position-control__container"> | ||
{position.x}, {position.y} | ||
</div> | ||
</Layer> | ||
); | ||
}; |
File renamed without changes.
Oops, something went wrong.