Skip to content

Commit e4cfa08

Browse files
v5.1.9 (#160)
* Bump patch version [ci:run] * Update README.md * Update README.md * Added backward compatibility for NodeStyleRule and EdgeStyleRule (#158) * Bump patch version [ci:run] * Fixed the container size --------- Co-authored-by: Linkurious ci bot <infra@linkurio.us>
1 parent 9e9aebb commit e4cfa08

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 5.1.7
2+
current_version = 5.1.9
33
commit = False
44
tag = False
55
serialize =

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.1.7
1+
5.1.9

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@linkurious/ogma-react",
3-
"version": "5.1.7",
3+
"version": "5.1.9",
44
"description": "A light adaptation of Ogma for React application",
55
"keywords": [
66
"ogma",

src/ogma.tsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ export const OgmaComponent = <ND, ED>(
4141
props: OgmaProps<ND, ED>,
4242
ref?: Ref<OgmaLib<ND, ED>>
4343
) => {
44-
const { options = defaultOptions, children, graph, onReady, theme, className = "ogma-container" } = props;
44+
const {
45+
options = defaultOptions,
46+
children,
47+
graph,
48+
onReady,
49+
theme,
50+
className = "ogma-container"
51+
} = props;
4552
const eventHandlersRef = useRef<EventHandlers<ND, ED>>({});
4653
const [ready, setReady] = useState(false);
4754
const [ogma, setOgma] = useState<OgmaLib | undefined>();
@@ -157,13 +164,16 @@ export const OgmaComponent = <ND, ED>(
157164

158165
return (
159166
<div
167+
style={{ width: "100%", height: "100%" }}
160168
className={className}
161169
ref={(containerRef) => setContainer(containerRef)}
162170
>
163171
{ogma && (
164-
<OgmaContext.Provider value={{
165-
ogma: ogma,
166-
}}>
172+
<OgmaContext.Provider
173+
value={{
174+
ogma: ogma
175+
}}
176+
>
167177
{ready && children}
168178
</OgmaContext.Provider>
169179
)}

0 commit comments

Comments
 (0)