Field editor fixes in Firefox (#284)
* fixing speed field picker * switching to open sans * alignment-baseline not support in FF
This commit is contained in:
parent
4f70d341e4
commit
8a331648d6
@ -40,7 +40,9 @@ export class FieldSpeed extends Blockly.FieldSlider implements Blockly.FieldCust
|
|||||||
var labelContainer = document.createElement('div');
|
var labelContainer = document.createElement('div');
|
||||||
this.speedSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg") as SVGGElement;
|
this.speedSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg") as SVGGElement;
|
||||||
pxsim.svg.hydrate(this.speedSVG, {
|
pxsim.svg.hydrate(this.speedSVG, {
|
||||||
viewBox: "0 0 200 100"
|
viewBox: "0 0 200 100",
|
||||||
|
width: "200",
|
||||||
|
height: "100"
|
||||||
});
|
});
|
||||||
|
|
||||||
labelContainer.appendChild(this.speedSVG);
|
labelContainer.appendChild(this.speedSVG);
|
||||||
@ -58,7 +60,7 @@ export class FieldSpeed extends Blockly.FieldSlider implements Blockly.FieldCust
|
|||||||
|
|
||||||
this.reporter = pxsim.svg.child(this.speedSVG, "text", {
|
this.reporter = pxsim.svg.child(this.speedSVG, "text", {
|
||||||
'x': 100, 'y': 80,
|
'x': 100, 'y': 80,
|
||||||
'text-anchor': 'middle', 'alignment-baseline': 'middle',
|
'text-anchor': 'middle', 'dominant-baseline': 'middle',
|
||||||
'style': 'font-size: 50px',
|
'style': 'font-size: 50px',
|
||||||
'class': 'sim-text inverted number'
|
'class': 'sim-text inverted number'
|
||||||
}) as SVGTextElement;
|
}) as SVGTextElement;
|
||||||
|
@ -56,7 +56,7 @@ export class FieldTurnRatio extends Blockly.FieldSlider implements Blockly.Field
|
|||||||
}, marker);
|
}, marker);
|
||||||
this.reporter_ = pxsim.svg.child(svg, "text", {
|
this.reporter_ = pxsim.svg.child(svg, "text", {
|
||||||
'x': FieldTurnRatio.HALF, 'y': 96,
|
'x': FieldTurnRatio.HALF, 'y': 96,
|
||||||
'text-anchor': 'middle', 'alignment-baseline': 'middle',
|
'text-anchor': 'middle', 'dominant-baseline': 'middle',
|
||||||
'style': 'font-size: 50px',
|
'style': 'font-size: 50px',
|
||||||
'class': 'sim-text inverted number'
|
'class': 'sim-text inverted number'
|
||||||
}) as SVGTextElement;
|
}) as SVGTextElement;
|
||||||
|
@ -23,7 +23,7 @@ namespace pxsim.visuals {
|
|||||||
|
|
||||||
this.reporter = pxsim.svg.child(this.group, "text", {
|
this.reporter = pxsim.svg.child(this.group, "text", {
|
||||||
'x': this.getWidth() / 2, 'y': this.getHeight() / 2,
|
'x': this.getWidth() / 2, 'y': this.getHeight() / 2,
|
||||||
'text-anchor': 'middle', 'alignment-baseline': 'middle',
|
'text-anchor': 'middle', 'dominant-baseline': 'middle',
|
||||||
'style': 'font-size: 50px',
|
'style': 'font-size: 50px',
|
||||||
'class': 'sim-text inverted number' }) as SVGTextElement;
|
'class': 'sim-text inverted number' }) as SVGTextElement;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace pxsim.visuals {
|
|||||||
|
|
||||||
this.reporter = pxsim.svg.child(this.group, "text", {
|
this.reporter = pxsim.svg.child(this.group, "text", {
|
||||||
'x': this.getInnerWidth() / 2, 'y': this.getInnerHeight() / 2,
|
'x': this.getInnerWidth() / 2, 'y': this.getInnerHeight() / 2,
|
||||||
'text-anchor': 'middle', 'alignment-baseline': 'middle',
|
'text-anchor': 'middle', 'dominant-baseline': 'middle',
|
||||||
'style': 'font-size: 50px',
|
'style': 'font-size: 50px',
|
||||||
'class': 'sim-text inverted number'
|
'class': 'sim-text inverted number'
|
||||||
}) as SVGTextElement;
|
}) as SVGTextElement;
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
User Global Variables
|
User Global Variables
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
@importGoogleFonts: false;
|
@importGoogleFonts: true;
|
||||||
|
|
||||||
@headerFont : Roboto,"Arial Narrow","Helvetica Neue",Helvetica,Arial,sans-serif;
|
@headerFont : "Open Sans","Arial Narrow","Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||||
@pageFont : Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;
|
@pageFont : "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||||
|
|
||||||
@emSize : 14px;
|
@emSize : 14px;
|
||||||
@fontSize : 13px;
|
@fontSize : 13px;
|
||||||
|
Loading…
Reference in New Issue
Block a user