2018-06-08 16:03:04 +02:00
|
|
|
// http://officeopenxml.com/drwPicFloating-position.php
|
2020-12-25 00:07:57 +00:00
|
|
|
// http://officeopenxml.com/drwPicFloating.php
|
2022-06-26 23:26:42 +01:00
|
|
|
import { HorizontalPositionAlign, VerticalPositionAlign } from "@file/shared/alignment";
|
2021-03-14 17:00:42 +00:00
|
|
|
|
2019-01-10 02:10:20 +00:00
|
|
|
import { ITextWrapping } from "../text-wrap";
|
2018-06-08 16:03:04 +02:00
|
|
|
|
|
|
|
export enum HorizontalPositionRelativeFrom {
|
|
|
|
CHARACTER = "character",
|
|
|
|
COLUMN = "column",
|
|
|
|
INSIDE_MARGIN = "insideMargin",
|
|
|
|
LEFT_MARGIN = "leftMargin",
|
|
|
|
MARGIN = "margin",
|
|
|
|
OUTSIDE_MARGIN = "outsideMargin",
|
|
|
|
PAGE = "page",
|
|
|
|
RIGHT_MARGIN = "rightMargin",
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum VerticalPositionRelativeFrom {
|
|
|
|
BOTTOM_MARGIN = "bottomMargin",
|
|
|
|
INSIDE_MARGIN = "insideMargin",
|
|
|
|
LINE = "line",
|
|
|
|
MARGIN = "margin",
|
|
|
|
OUTSIDE_MARGIN = "outsideMargin",
|
|
|
|
PAGE = "page",
|
|
|
|
PARAGRAPH = "paragraph",
|
|
|
|
TOP_MARGIN = "topMargin",
|
|
|
|
}
|
|
|
|
|
2018-06-09 23:49:01 +01:00
|
|
|
export interface IHorizontalPositionOptions {
|
2019-01-09 01:16:47 +00:00
|
|
|
readonly relative?: HorizontalPositionRelativeFrom;
|
2018-11-02 02:51:57 +00:00
|
|
|
readonly align?: HorizontalPositionAlign;
|
|
|
|
readonly offset?: number;
|
2018-06-08 16:03:04 +02:00
|
|
|
}
|
|
|
|
|
2018-06-09 23:49:01 +01:00
|
|
|
export interface IVerticalPositionOptions {
|
2019-01-09 01:16:47 +00:00
|
|
|
readonly relative?: VerticalPositionRelativeFrom;
|
2018-11-02 02:51:57 +00:00
|
|
|
readonly align?: VerticalPositionAlign;
|
|
|
|
readonly offset?: number;
|
2018-06-08 16:03:04 +02:00
|
|
|
}
|
|
|
|
|
2019-01-10 02:10:20 +00:00
|
|
|
export interface IMargins {
|
|
|
|
readonly left?: number;
|
|
|
|
readonly bottom?: number;
|
|
|
|
readonly top?: number;
|
|
|
|
readonly right?: number;
|
|
|
|
}
|
|
|
|
|
2018-06-09 23:49:01 +01:00
|
|
|
export interface IFloating {
|
2018-11-02 02:51:57 +00:00
|
|
|
readonly horizontalPosition: IHorizontalPositionOptions;
|
|
|
|
readonly verticalPosition: IVerticalPositionOptions;
|
|
|
|
readonly allowOverlap?: boolean;
|
|
|
|
readonly lockAnchor?: boolean;
|
|
|
|
readonly behindDocument?: boolean;
|
|
|
|
readonly layoutInCell?: boolean;
|
2019-01-10 02:10:20 +00:00
|
|
|
readonly margins?: IMargins;
|
|
|
|
readonly wrap?: ITextWrapping;
|
2020-12-25 00:07:57 +00:00
|
|
|
readonly zIndex?: number;
|
2018-06-08 16:03:04 +02:00
|
|
|
}
|