From 6abaab34cb022bcb0a7736ca77a4508e57e3e821 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 12 May 2015 11:01:49 +0100 Subject: [PATCH] Add deepCopy() method (not yet working) and the private methods that it uses. --- src/mkws-filter.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/mkws-filter.js b/src/mkws-filter.js index 004fe83..6df47aa 100644 --- a/src/mkws-filter.js +++ b/src/mkws-filter.js @@ -124,6 +124,23 @@ function filterSet(team) { return hash; }; + that.deepCopy = function() { + var fs = filterSet(m_team); + document.write("setting list to " + mkws.$.toJSON(m_list) + "
"); + fs._setList($.extend({}, m_list)); + return fs; + }; + + // Used only by clone() + that._setList = function(list) { + m_list = list; + }; + + /// Shouldn't be used at all + that._list = function() { + return m_list; + }; + return that; } -- 1.7.10.4