From cd2010e85e22d45bfed156f34ae1c780484ecb30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 16 Apr 2013 11:43:22 +0200 Subject: [PATCH] Various JS improvements --- js/pmd/iecanvas.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/pmd/iecanvas.js b/js/pmd/iecanvas.js index 2fb090dddc..e2b8e81d06 100644 --- a/js/pmd/iecanvas.js +++ b/js/pmd/iecanvas.js @@ -35,8 +35,8 @@ if (!window.all) { // if IE function convert_style(str) { var m = []; m = str.match(/.*\((\d*),(\d*),(\d*),(\d*)\)/); - for (var i = 1; i<=3; i++) { - m[i] = (m[i]*1).toString(16).length < 2 ? '0' + (m[i]*1).toString(16) : (m[i]*1).toString(16); + for (var i = 1; i <= 3; i++) { + m[i] = (m[i] * 1).toString(16).length < 2 ? '0' + (m[i] * 1).toString(16) : (m[i] * 1).toString(16); } return ['#' + m[1] + m[2] + m[3], 1]; } @@ -124,10 +124,10 @@ if (!window.all) { // if IE if (p.type == "moveTo") { Str.push(" m "); - Str.push(Math.floor(p.x), ",",Math.floor(p.y)); + Str.push(Math.floor(p.x), ",", Math.floor(p.y)); } else if (p.type == "lineTo") { Str.push(" l "); - Str.push(Math.floor(p.x), ",",Math.floor(p.y)); + Str.push(Math.floor(p.x), ",", Math.floor(p.y)); } else if (p.type == "close") { Str.push(" x "); } else if (p.type == "arc") { @@ -146,6 +146,6 @@ if (!window.all) { // if IE this.element_.insertAdjacentHTML("beforeEnd", Str.join("")); this.pmd_arr = []; - } + }; } }