mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-16 06:36:33 +00:00
Text font color support
This commit is contained in:
parent
fa38d6bdf2
commit
599491fa88
src/app/cartography/shared/widgets/drawings
@ -40,6 +40,7 @@ describe('TextDrawingWidget', () => {
|
||||
expect(drew.size()).toEqual(1);
|
||||
const text_element = drew.nodes()[0];
|
||||
expect(text_element.innerHTML).toEqual('<tspan x="0" dy="0em">THIS IS TEXT</tspan>');
|
||||
expect(text_element.getAttribute('fill')).toEqual("#000000");
|
||||
expect(text_element.getAttribute('style')).toEqual('font-family: "TypeWriter"; font-size: 10pt; font-weight: bold');
|
||||
});
|
||||
|
||||
|
@ -32,7 +32,8 @@ export class TextDrawingWidget implements DrawingWidget {
|
||||
styles.push(`font-weight: ${text.font_weight}`);
|
||||
}
|
||||
return styles.join("; ");
|
||||
});
|
||||
})
|
||||
.attr('fill', (text) => text.fill);
|
||||
|
||||
const lines = merge.selectAll<SVGTSpanElement, string>('tspan')
|
||||
.data((text: TextElement) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user