From 086485dc95e71191520d71cd601699053f533da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 20 Dec 2015 22:40:06 +0100 Subject: [PATCH] Minor code clean-up. --- src/event/Key.js | 4 ++-- src/path/Path.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/event/Key.js b/src/event/Key.js index 8470eee6..33a1007a 100644 --- a/src/event/Key.js +++ b/src/event/Key.js @@ -146,8 +146,8 @@ var Key = new function() { if (key.length > 1 || browser.chrome && (event.altKey || browser.mac && event.metaKey || !browser.mac && event.ctrlKey)) { - handleKey(true, key, charLookup[key] || - (key.length > 1 ? '' : key), event); + handleKey(true, key, charLookup[key] + || (key.length > 1 ? '' : key), event); // Do not set downKey as we handled it already. E.g. space would // be handled twice otherwise, once here, once in keypress. } else { diff --git a/src/path/Path.js b/src/path/Path.js index f0e5280b..572655c8 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -367,7 +367,8 @@ var Path = PathItem.extend(/** @lends Path# */{ }, _transformContent: function(matrix) { - var coords = new Array(6), segments = this._segments; + var segments = this._segments, + coords = new Array(6); for (var i = 0, l = segments.length; i < l; i++) segments[i]._transformCoordinates(matrix, coords, true); return true;