refactor: 文本、形状、图片的rotate改为必选属性

This commit is contained in:
pipipi-pikachu 2021-04-26 19:48:58 +08:00
parent 2279547c20
commit 5a95639ea1
2 changed files with 6 additions and 6 deletions

View File

@ -63,7 +63,7 @@ export default () => {
left: (VIEWPORT_SIZE - width) / 2,
top: (VIEWPORT_SIZE * viewportRatio.value - height) / 2,
fixedRatio: true,
rotate: 0
rotate: 0,
})
})
}
@ -148,7 +148,7 @@ export default () => {
width,
height,
content,
rotate: 0
rotate: 0,
})
}
@ -170,7 +170,7 @@ export default () => {
path: data.path,
fill: themeColor.value,
fixedRatio: false,
rotate: 0
rotate: 0,
})
}

View File

@ -35,7 +35,7 @@ interface PPTBaseElement {
export interface PPTTextElement extends PPTBaseElement{
type: 'text';
content: string;
rotate?: number;
rotate: number;
outline?: PPTElementOutline;
fill?: string;
lineHeight?: number;
@ -65,7 +65,7 @@ export interface PPTImageElement extends PPTBaseElement{
type: 'image';
fixedRatio: boolean;
src: string;
rotate?: number;
rotate: number;
outline?: PPTElementOutline;
filters?: ImageElementFilters;
clip?: ImageElementClip;
@ -85,7 +85,7 @@ export interface PPTShapeElement extends PPTBaseElement{
fixedRatio: boolean;
fill: string;
gradient?: ShapeGradient;
rotate?: number;
rotate: number;
outline?: PPTElementOutline;
opacity?: number;
flip?: ImageOrShapeFlip;