Introduce panel system for match information
Change-Id: Id209cb9d928f4511d02ade47543c3486a611313e
diff --git a/dev/js/src/panel.js b/dev/js/src/panel.js
index 9d7968f..acdf6d8 100644
--- a/dev/js/src/panel.js
+++ b/dev/js/src/panel.js
@@ -85,6 +85,9 @@
view.element()
);
+ if (view.afterEmbed)
+ view.afterEmbed();
+
view.panel = this;
},
@@ -98,5 +101,18 @@
}
}
},
+
+ /**
+ * Upgrade this object to another object,
+ * while private data stays intact.
+ *
+ * @param {Object] An object with properties.
+ */
+ upgradeTo : function (props) {
+ for (var prop in props) {
+ this[prop] = props[prop];
+ };
+ return this;
+ }
}
});