Merged PR 216: Deprecate parent from IContainerModel for FindContainerById

This commit is contained in:
Eric Nguyen 2022-10-17 16:01:06 +00:00
parent d40cd8cf8e
commit b4eba6bb9b
19 changed files with 97 additions and 109 deletions

View file

@ -6,6 +6,7 @@ import { GetAbsolutePosition } from '../../../../utils/itertools';
import { RemoveMargin } from '../../../../utils/svg';
interface ISelectorProps {
containers: Map<string, IContainerModel>
selected?: IContainerModel
scale?: number
}
@ -19,7 +20,7 @@ export function Selector(props: ISelectorProps): JSX.Element {
}
const scale = (props.scale ?? 1);
let [x, y] = GetAbsolutePosition(props.selected);
let [x, y] = GetAbsolutePosition(props.containers, props.selected);
let [width, height] = [
props.selected.properties.width,
props.selected.properties.height