Skip to content

Commit

Permalink
Update with spoenemann comments
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Fontorbe <[email protected]>
  • Loading branch information
gfontorbe committed Feb 12, 2024
1 parent d549fa2 commit ad34d59
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/sprotty-protocol/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ export interface ModelLayoutOptions {
minWidth?: number
minHeight?: number
resizeContainer?: boolean
[key: string]: string | number | boolean | undefined};
[key: string]: string | number | boolean | undefined
};

export type HAlignment = 'left' | 'center' | 'right';
export type VAlignment = 'top' | 'center' | 'bottom';
Expand All @@ -175,13 +176,13 @@ export type VAlignment = 'top' | 'center' | 'bottom';
* Used to identify model elements that specify a layout to apply to their children.
*/
export interface LayoutContainer extends LayoutableChild {
layout: Layout
layout: LayoutKind
}

/**
* Type for the layout property of a `LayoutContainer`.
*/
export type Layout = 'stack' | 'vbox' | 'hbox' | (string & {});
export type LayoutKind = 'stack' | 'vbox' | 'hbox' | (string & {});

/**
* Feature extension interface for `alignFeature`.
Expand Down
6 changes: 6 additions & 0 deletions packages/sprotty/src/features/bounds/layout-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

import { JsonMap } from 'sprotty-protocol/lib/utils/json';

/** @deprecated Use HAlignment from `sprotty-protocol` instead */
export type HAlignment = 'left' | 'center' | 'right';

/** @deprecated Use VAlignment from `sprotty-protocol` instead */
export type VAlignment = 'top' | 'center' | 'bottom';

export interface AbstractLayoutOptions extends JsonMap {
resizeContainer: boolean
paddingTop: number
Expand Down

0 comments on commit ad34d59

Please sign in to comment.