kopia lustrzana https://github.com/Tldraw/Tldraw
Update test-text.spec.ts
rodzic
5711530f1b
commit
4d19b78ca4
|
@ -157,7 +157,7 @@ test.describe('text measurement', () => {
|
|||
measureTextSpansOptions
|
||||
)
|
||||
|
||||
expect(formatLines(spans)).toEqual([[' ', 'testing', ' '], ['testing']])
|
||||
expect(formatLines(spans)).toEqual([[' ', 'testing', ' ', 'testing']])
|
||||
})
|
||||
|
||||
test('should place starting whitespace on its own line if it has to', async () => {
|
||||
|
@ -284,7 +284,7 @@ test.describe('text measurement', () => {
|
|||
return editor.getShape(id) as TLNoteShape
|
||||
})
|
||||
|
||||
expect(shape.props.fontSizeAdjustment).toEqual(28)
|
||||
expect(shape.props.fontSizeAdjustment).toEqual(27)
|
||||
})
|
||||
|
||||
test('for auto-font-sizing shapes, should auto-size text that have long words', async () => {
|
||||
|
@ -306,7 +306,7 @@ test.describe('text measurement', () => {
|
|||
return editor.getShape(id) as TLNoteShape
|
||||
})
|
||||
|
||||
expect(shape.props.fontSizeAdjustment).toEqual(21)
|
||||
expect(shape.props.fontSizeAdjustment).toEqual(20)
|
||||
})
|
||||
|
||||
test('for auto-font-sizing shapes, should wrap text that has words that are way too long', async () => {
|
||||
|
|
|
@ -221,9 +221,9 @@ export class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|||
isPrecise: boolean;
|
||||
}>;
|
||||
point: ObjectValidator< {
|
||||
type: "point";
|
||||
x: number;
|
||||
y: number;
|
||||
type: "point";
|
||||
}>;
|
||||
}, never>;
|
||||
end: UnionValidator<"type", {
|
||||
|
@ -235,9 +235,9 @@ export class ArrowShapeUtil extends ShapeUtil<TLArrowShape> {
|
|||
isPrecise: boolean;
|
||||
}>;
|
||||
point: ObjectValidator< {
|
||||
type: "point";
|
||||
x: number;
|
||||
y: number;
|
||||
type: "point";
|
||||
}>;
|
||||
}, never>;
|
||||
bend: Validator<number>;
|
||||
|
@ -1058,10 +1058,10 @@ export class LineShapeUtil extends ShapeUtil<TLLineShape> {
|
|||
size: EnumStyleProp<"l" | "m" | "s" | "xl">;
|
||||
spline: EnumStyleProp<"cubic" | "line">;
|
||||
points: DictValidator<string, {
|
||||
id: string;
|
||||
x: number;
|
||||
y: number;
|
||||
index: IndexKey;
|
||||
id: string;
|
||||
}>;
|
||||
};
|
||||
// (undocumented)
|
||||
|
|
|
@ -1645,7 +1645,7 @@
|
|||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "<{\n x: number;\n y: number;\n type: \"point\";\n }>;\n }, never>;\n end: import(\"@tldraw/editor\")."
|
||||
"text": "<{\n type: \"point\";\n x: number;\n y: number;\n }>;\n }, never>;\n end: import(\"@tldraw/editor\")."
|
||||
},
|
||||
{
|
||||
"kind": "Reference",
|
||||
|
@ -1690,7 +1690,7 @@
|
|||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "<{\n x: number;\n y: number;\n type: \"point\";\n }>;\n }, never>;\n bend: import(\"@tldraw/editor\")."
|
||||
"text": "<{\n type: \"point\";\n x: number;\n y: number;\n }>;\n }, never>;\n bend: import(\"@tldraw/editor\")."
|
||||
},
|
||||
{
|
||||
"kind": "Reference",
|
||||
|
@ -12374,7 +12374,7 @@
|
|||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "<string, {\n id: string;\n x: number;\n y: number;\n index: import(\"@tldraw/editor\")."
|
||||
"text": "<string, {\n x: number;\n y: number;\n index: import(\"@tldraw/editor\")."
|
||||
},
|
||||
{
|
||||
"kind": "Reference",
|
||||
|
@ -12383,7 +12383,7 @@
|
|||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": ";\n }>;\n }"
|
||||
"text": ";\n id: string;\n }>;\n }"
|
||||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
|
|
|
@ -47,9 +47,9 @@ export const arrowShapeProps: {
|
|||
isPrecise: boolean;
|
||||
} & {}>;
|
||||
point: T.ObjectValidator<{
|
||||
type: "point";
|
||||
x: number;
|
||||
y: number;
|
||||
type: "point";
|
||||
} & {}>;
|
||||
}, never>;
|
||||
end: T.UnionValidator<"type", {
|
||||
|
@ -61,9 +61,9 @@ export const arrowShapeProps: {
|
|||
isPrecise: boolean;
|
||||
} & {}>;
|
||||
point: T.ObjectValidator<{
|
||||
type: "point";
|
||||
x: number;
|
||||
y: number;
|
||||
type: "point";
|
||||
} & {}>;
|
||||
}, never>;
|
||||
bend: T.Validator<number>;
|
||||
|
@ -666,10 +666,10 @@ export const lineShapeProps: {
|
|||
size: EnumStyleProp<"l" | "m" | "s" | "xl">;
|
||||
spline: EnumStyleProp<"cubic" | "line">;
|
||||
points: T.DictValidator<string, {
|
||||
id: string;
|
||||
x: number;
|
||||
y: number;
|
||||
index: IndexKey;
|
||||
id: string;
|
||||
} & {}>;
|
||||
};
|
||||
|
||||
|
|
|
@ -364,7 +364,7 @@
|
|||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "<{\n x: number;\n y: number;\n type: \"point\";\n } & {}>;\n }, never>;\n end: "
|
||||
"text": "<{\n type: \"point\";\n x: number;\n y: number;\n } & {}>;\n }, never>;\n end: "
|
||||
},
|
||||
{
|
||||
"kind": "Reference",
|
||||
|
@ -409,7 +409,7 @@
|
|||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "<{\n x: number;\n y: number;\n type: \"point\";\n } & {}>;\n }, never>;\n bend: "
|
||||
"text": "<{\n type: \"point\";\n x: number;\n y: number;\n } & {}>;\n }, never>;\n bend: "
|
||||
},
|
||||
{
|
||||
"kind": "Reference",
|
||||
|
@ -2818,7 +2818,7 @@
|
|||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": "<string, {\n id: string;\n x: number;\n y: number;\n index: "
|
||||
"text": "<string, {\n x: number;\n y: number;\n index: "
|
||||
},
|
||||
{
|
||||
"kind": "Reference",
|
||||
|
@ -2827,7 +2827,7 @@
|
|||
},
|
||||
{
|
||||
"kind": "Content",
|
||||
"text": ";\n } & {}>;\n}"
|
||||
"text": ";\n id: string;\n } & {}>;\n}"
|
||||
}
|
||||
],
|
||||
"fileUrlPath": "packages/tlschema/src/shapes/TLLineShape.ts",
|
||||
|
|
Ładowanie…
Reference in New Issue