Files
ionic-framework/js/views/headerBar.js
2013-09-27 10:42:19 -05:00

31 lines
545 B
JavaScript

(function(ionic) {
ionic.views.HeaderBar = function(opts) {
this.el = opts.el;
this._titleEl = this.el.querySelector('.title');
};
ionic.views.NavBar.prototype = {
resizeTitle: function() {
var
e,
j,
i,
title,
titleWidth,
children = this.el.children;
for(i = 0, j = children.length; i < j; i++) {
e = children[i];
if(/h\d/.test(e.nodeName.toLowerCase())) {
title = e;
}
}
titleWidth = title.offsetWidth;
}
};
})(ionic);