projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d736fde
)
Add deepCopy() method (not yet working) and the private methods that it uses.
author
Mike Taylor
<mike@indexdata.com>
Tue, 12 May 2015 10:01:49 +0000
(11:01 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Tue, 12 May 2015 10:01:49 +0000
(11:01 +0100)
src/mkws-filter.js
patch
|
blob
|
history
diff --git
a/src/mkws-filter.js
b/src/mkws-filter.js
index
004fe83
..
6df47aa
100644
(file)
--- 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) + "<br/>");
+ 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;
}