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
|
|
|
|
2023-12-22 10:25:00 +09:00
|
|
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
|
|
export const HorizontalPositionRelativeFrom = {
|
|
|
|
CHARACTER: "character",
|
|
|
|
COLUMN: "column",
|
|
|
|
INSIDE_MARGIN: "insideMargin",
|
|
|
|
LEFT_MARGIN: "leftMargin",
|
|
|
|
MARGIN: "margin",
|
|
|
|
OUTSIDE_MARGIN: "outsideMargin",
|
|
|
|
PAGE: "page",
|
|
|
|
RIGHT_MARGIN: "rightMargin",
|
|
|
|
} as const;
|
2018-06-08 16:03:04 +02:00
|
|
|
|
2023-12-22 10:25:00 +09:00
|
|
|
export const VerticalPositionRelativeFrom = {
|
|
|
|
BOTTOM_MARGIN: "bottomMargin",
|
|
|
|
INSIDE_MARGIN: "insideMargin",
|
|
|
|
LINE: "line",
|
|
|
|
MARGIN: "margin",
|
|
|
|
OUTSIDE_MARGIN: "outsideMargin",
|
|
|
|
PAGE: "page",
|
|
|
|
PARAGRAPH: "paragraph",
|
|
|
|
TOP_MARGIN: "topMargin",
|
|
|
|
} as const;
|
2018-06-08 16:03:04 +02:00
|
|
|
|
2023-12-22 10:25:00 +09:00
|
|
|
/* eslint-enable */
|
2018-06-09 23:49:01 +01:00
|
|
|
export interface IHorizontalPositionOptions {
|
2023-12-22 10:25:00 +09:00
|
|
|
readonly relative?: (typeof HorizontalPositionRelativeFrom)[keyof typeof HorizontalPositionRelativeFrom];
|
|
|
|
readonly align?: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign];
|
2018-11-02 02:51:57 +00:00
|
|
|
readonly offset?: number;
|
2018-06-08 16:03:04 +02:00
|
|
|
}
|
|
|
|
|
2018-06-09 23:49:01 +01:00
|
|
|
export interface IVerticalPositionOptions {
|
2023-12-22 10:25:00 +09:00
|
|
|
readonly relative?: (typeof VerticalPositionRelativeFrom)[keyof typeof VerticalPositionRelativeFrom];
|
|
|
|
readonly align?: (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign];
|
2018-11-02 02:51:57 +00:00
|
|
|
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
|
|
|
}
|