mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
filename updates
This commit is contained in:
28
js/views/headerBarView.js
Normal file
28
js/views/headerBarView.js
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
(function(ionic) {
|
||||
|
||||
ionic.views.HeaderBar = function(opts) {
|
||||
this.el = opts.el;
|
||||
|
||||
this._titleEl = this.el.querySelector('.title');
|
||||
};
|
||||
|
||||
ionic.views.HeaderBar.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);
|
||||
Reference in New Issue
Block a user