From de2655ce019fc2cc724551259e072ef80a9d4855 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 24 Jan 2011 12:49:50 +1100 Subject: [PATCH 1/2] Document Map#id. --HG-- extra : rebase_source : 2cbd2fe1cfee7446b4c07e13e0d22b7b00aaa25c --- common/content/mappings.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/content/mappings.js b/common/content/mappings.js index 124aab47..5be880dd 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -50,6 +50,8 @@ var Map = Class("Map", { get toStringParams() [this.modes.map(function (m) m.name), this.names.map(String.quote)], + /** @property {number} A unique ID for this mapping. */ + id: null, /** @property {number[]} All of the modes for which this mapping applies. */ modes: null, /** @property {string[]} All of this mapping's names (key sequences). */ From 162d9122b22e31f3570d04533ce58e12b63c5bec Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 24 Jan 2011 14:19:55 +1100 Subject: [PATCH 2/2] Fix mappings.iterate. --- common/content/mappings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/content/mappings.js b/common/content/mappings.js index 5be880dd..50cea553 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -304,7 +304,7 @@ var Mappings = Module("mappings", { iterate: function (mode) { let seen = {}; for (let hive in this.hives.iterValues()) - for (let map in hive.getStack(mode).iterValues()) + for (let map in array(hive.getStack(mode)).iterValues()) if (!set.add(seen, map.name)) yield map; },