mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-10 17:33:24 +01:00
Fix Text SVG
This commit is contained in:
parent
17b22ca211
commit
e07c13631c
@ -20,7 +20,7 @@ import Font from './Font';
|
|||||||
class ArialFont extends Font {
|
class ArialFont extends Font {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this._fontFamily = 'arial';
|
this._fontFamily = 'Arial';
|
||||||
}
|
}
|
||||||
|
|
||||||
getFontFamily() {
|
getFontFamily() {
|
||||||
|
@ -20,7 +20,7 @@ import Font from './Font';
|
|||||||
class TahomaFont extends Font {
|
class TahomaFont extends Font {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this._fontFamily = 'tahoma';
|
this._fontFamily = 'Tahoma';
|
||||||
}
|
}
|
||||||
|
|
||||||
getFontFamily() {
|
getFontFamily() {
|
||||||
|
@ -52,7 +52,7 @@ class TextPeer extends ElementPeer {
|
|||||||
const me = this;
|
const me = this;
|
||||||
// FIXME: we could use underscorejs here
|
// FIXME: we could use underscorejs here
|
||||||
lines.forEach((line) => {
|
lines.forEach((line) => {
|
||||||
const tspan = window.document.createElementNS(me.svgNamespace, 'tspan');
|
const tspan = window.document.createElementNS(ElementPeer.svgNamespace, 'tspan');
|
||||||
tspan.setAttribute('dy', '1em');
|
tspan.setAttribute('dy', '1em');
|
||||||
tspan.setAttribute('x', me.getPosition().x);
|
tspan.setAttribute('x', me.getPosition().x);
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import Font from './Font';
|
|||||||
class TimesFont extends Font {
|
class TimesFont extends Font {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this._fontFamily = 'times';
|
this._fontFamily = 'Times';
|
||||||
}
|
}
|
||||||
|
|
||||||
getFontFamily() {
|
getFontFamily() {
|
||||||
|
@ -20,7 +20,7 @@ import Font from './Font';
|
|||||||
class VerdanaFont extends Font {
|
class VerdanaFont extends Font {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this._fontFamily = 'verdana';
|
this._fontFamily = 'Verdana';
|
||||||
}
|
}
|
||||||
|
|
||||||
getFontFamily() {
|
getFontFamily() {
|
||||||
|
Loading…
Reference in New Issue
Block a user