Feat/minimap (#44)

* feat: New minimap

* imporved preview

* better start values

* smarter destructure

* getNodesInside refactor

* refactor(minimap): add maskColor and nodeBorderRadius props

* refactor(gitignore): add dist

* refactor(minimap): show empty minimap when there are no nodes

closes #39
This commit is contained in:
AndyLnd
2019-10-22 14:15:36 +02:00
committed by Moritz
parent 99dcc775b4
commit dcc38b23d8
14 changed files with 2525 additions and 504 deletions
+6 -8
View File
@@ -20,9 +20,11 @@ export interface Dimensions {
width: number;
height: number;
}
export interface Rect extends Dimensions {
x: number;
y: number;
export interface Rect extends Dimensions, XYPosition {
}
export interface Box extends XYPosition {
x2: number;
y2: number;
}
export interface SelectionRect extends Rect {
startX: number;
@@ -90,13 +92,9 @@ export declare type Connection = {
target: ElementId | null;
};
export declare type OnConnectFunc = (params: Connection) => void;
export interface HandleElement {
export interface HandleElement extends XYPosition, Dimensions {
id?: ElementId | null;
position: Position;
x: number;
y: number;
width: number;
height: number;
}
export interface EdgeCompProps {
id: ElementId;