source: trunk/htdocs/scripts/atnf-oo-utils.js

Last change on this file was 193, checked in by MatthewWhiting, 17 years ago
  • Fixed bugs in view_profiles that meant some figures were not being plotted.
  • Updated scripts.
  • Fixed bug in query by pulsar name.
  • Property svn:executable set to *
File size: 459 bytes
Line 
1/*
2** Would be nice to do things this way
3** but it breaks array interation
4
5Object.prototype.extend = function(obj) {
6        for (var prop in obj) {
7                this[prop] = obj[prop];
8        }
9}
10
11*/
12
13
14/*
15Object.prototype.inherit = function(obj) {
16        for (var prop in obj) {
17                if (!this[prop]) {
18                        this[prop] = obj[prop];
19                }
20        }
21}
22*/
23
24
25var OOUtils = {
26        extend: function(classObj, extensionObj) {
27                for (var prop in extensionObj) {
28                        classObj[prop] = extensionObj[prop];
29                }
30        }
31}
Note: See TracBrowser for help on using the repository browser.