mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
29 lines
516 B
JavaScript
29 lines
516 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;
|
|
var j;
|
|
var children = this.el.children;
|
|
|
|
var title;
|
|
var titleWidth;
|
|
|
|
for(var i = 0; j = children.length; i < j; i++) {
|
|
e = children[i];
|
|
if(/h\d/.test(e.nodeName.toLowerCase())) {
|
|
title = e;
|
|
}
|
|
}
|
|
|
|
titleWidth = title.offsetWidth;
|
|
}
|
|
};
|
|
})(window.ionic);
|