Implement dimension

This commit is contained in:
Siklos 2022-08-03 00:02:41 +02:00
parent be00496581
commit c54e9ff3cb
3 changed files with 106 additions and 0 deletions

View file

@ -1,6 +1,7 @@
import * as React from 'react';
import { ReactSVGPanZoom, Tool, Value, TOOL_PAN } from 'react-svg-pan-zoom';
import { Container } from './Elements/Container';
import { DimensionLayer } from './Elements/DimensionLayer';
interface ISVGProps {
children: Container | Container[] | null,
@ -79,6 +80,7 @@ export class SVG extends React.Component<ISVGProps> {
>
<svg ref={this.svg} {...properties}>
{ children }
<DimensionLayer isHidden={false} roots={this.props.children} />
</svg>
</ReactSVGPanZoom>
);