fixing simulator in IE11

This commit is contained in:
Peli de Halleux 2016-10-16 20:09:13 -07:00
parent 4dbebe3e15
commit b968d3b1de
2 changed files with 3 additions and 5 deletions

View File

@ -2,7 +2,7 @@
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 251.8 222.2" enable-background="new 0 0 251.8 222.2" xml:space="preserve"> viewBox="0 0 251.8 222.2" width="251.8" height="222.2" enable-background="new 0 0 251.8 222.2" xml:space="preserve">
<symbol id="Mini_front" viewBox="-121.4 -112.4 242.4 214.1"> <symbol id="Mini_front" viewBox="-121.4 -112.4 242.4 214.1">
<g> <g>

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

@ -143,8 +143,7 @@ namespace pxsim.visuals {
stroke-width: 2px; stroke-width: 2px;
} }
`; `;
const BOARD_SVG = ` const BOARD_SVG = `<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> <!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
@ -1386,8 +1385,7 @@ namespace pxsim.visuals {
} }
private buildDom() { private buildDom() {
this.element = <SVGSVGElement>svg.elt("svg") this.element = new DOMParser().parseFromString(BOARD_SVG, "image/svg+xml").querySelector("svg") as SVGSVGElement;
this.element.innerHTML = BOARD_SVG;
svg.hydrate(this.element, { svg.hydrate(this.element, {
"version": "1.0", "version": "1.0",
"viewBox": `0 0 ${MB_WIDTH} ${MB_HEIGHT}`, "viewBox": `0 0 ${MB_WIDTH} ${MB_HEIGHT}`,