polestar-gojs
v0.1.12
Published
POLESTAR GOJS
Downloads
5
Readme
polestar-gojs
React Component for gojs
Install
$ npm install --save polestar-gojs
Usage
import React, { Component } from 'react';
import go, { GojsDiagram, $make } from 'polestar-gojs';
class MyComponent extends Component {
render() {
return (
<GojsDiagram
ref={this.diagramRef}
diagramId="testId"
// diagram={this.diagram}
// layout={() => $make(
// go.TreeLayout, // specify a Diagram.layout that arranges trees
// { angle: 90, layerSpacing: 35 },
// )}
// layout={$make(go.TreeLayout)}
undoable={false}
nodeTemplate={this.nodeTemplate}
nodeTemplateMaps={this.nodeTemplateMaps()}
groupTemplate={this.groupTemplate}
linkTemplate={this.linkTemplate}
linkTemplateMaps={this.linkTemplateMaps()}
model={this.model}
width={500}
height={900}
contextMenu={this.contextMenu}
readOnly={false}
onComplete={this.handleComplete}
/>
);
}
}
export default MyComponent;
Tables?
| Feature | Support | | --------- | ------- | | tables | ✔ | | alignment | ✔ | | wewt | ✔ |