mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +08:00
28 lines
554 B
JavaScript
28 lines
554 B
JavaScript
(function(ionic) {
|
|
'use strict';
|
|
|
|
ionic.views.HeaderBar = ionic.views.View.inherit({
|
|
initialize: function(opts) {
|
|
this.el = opts.el;
|
|
|
|
this._titleEl = this.el.querySelector('.title');
|
|
},
|
|
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);
|