Skip to content
Snippets Groups Projects
Commit ad4c9c00 authored by Miłosz Grocholewski's avatar Miłosz Grocholewski
Browse files

refactor(vector-map): change font units from px to pt

parent 4d6757ec
No related branches found
No related tags found
4 merge requests!271Resolve MIN-39 "Feat/ glyphs",!265feat(vector-map): add drawer to control individual layers + add support for text layer,!261feat(vector-map): add support for homomultimer option,!260feat(vector-map): add drawing compartments
Pipeline #96294 passed
...@@ -18,7 +18,7 @@ describe('getText', () => { ...@@ -18,7 +18,7 @@ describe('getText', () => {
}); });
expect(textCoords).toEqual([50, 50]); expect(textCoords).toEqual([50, 50]);
expect(textStyle.getText()?.getFont()).toEqual('bold 12px Arial'); expect(textStyle.getText()?.getFont()).toEqual('12pt Arial');
}); });
it('should return correct text coordinates and style when text is aligned to bottom', () => { it('should return correct text coordinates and style when text is aligned to bottom', () => {
...@@ -36,6 +36,6 @@ describe('getText', () => { ...@@ -36,6 +36,6 @@ describe('getText', () => {
expect(textCoords).toEqual([70, 121]); expect(textCoords).toEqual([70, 121]);
expect(textStyle.getText()?.getFont()).toEqual('bold 18px Arial'); expect(textStyle.getText()?.getFont()).toEqual('18pt Arial');
}); });
}); });
...@@ -67,7 +67,7 @@ export default function getText({ ...@@ -67,7 +67,7 @@ export default function getText({
}, },
text: new Text({ text: new Text({
text, text,
font: `bold ${fontSize}px Arial`, font: `${fontSize}pt Arial`,
fill: new Fill({ fill: new Fill({
color, color,
}), }),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment