* Various cleanup + utility methods

This commit is contained in:
Bryan Ashby 2014-11-04 23:50:42 -07:00
parent d242546458
commit f2388ceed1
6 changed files with 68 additions and 21 deletions

View file

@ -10,14 +10,14 @@ var assert = require('assert');
exports.TickerTextView = TickerTextView;
TickerTextView = function(client, options) {
function TickerTextView(client, options) {
View.call(this, client, options);
var self = this;
this.text = this.options.text || '';
this.tickerStyle = this.options.tickerStyle || 'rightToLeft';
asssert(this.tickerStyle in TickerTextView.TickerStyles);
assert(this.tickerStyle in TickerTextView.TickerStyles);
// :TODO: Ticker |text| should have ANSI stripped before calculating any lengths/etc.
// strUtil.ansiTextLength(s)