Remove $ from property names.

This commit is contained in:
Julian Viereck 2011-10-01 17:16:11 +02:00
parent 9c58cd4817
commit b69c6cba6e
2 changed files with 14 additions and 14 deletions

View File

@ -501,8 +501,8 @@ var FontShape = (function FontShape() {
var italic = this.italic ? 'italic' : 'normal'; var italic = this.italic ? 'italic' : 'normal';
this.fontFallback = this.serif ? 'serif' : 'sans-serif'; this.fontFallback = this.serif ? 'serif' : 'sans-serif';
this.$name1 = italic + ' ' + bold + ' '; this.namePart1 = italic + ' ' + bold + ' ';
this.$name2 = 'px "' + name + '", "'; this.namePart2 = 'px "' + name + '", "';
this.supported = Object.keys(this.encoding).length != 0; this.supported = Object.keys(this.encoding).length != 0;
@ -517,7 +517,7 @@ var FontShape = (function FontShape() {
constructor.prototype = { constructor.prototype = {
getRule: function fonts_getRule(size, fallback) { getRule: function fonts_getRule(size, fallback) {
fallback = fallback || this.fontFallback; fallback = fallback || this.fontFallback;
return this.$name1 + size + this.$name2 + fallback + '"'; return this.namePart1 + size + this.namePart2 + fallback + '"';
}, },
charsToUnicode: function fonts_chars2Unicode(chars) { charsToUnicode: function fonts_chars2Unicode(chars) {

View File

@ -115,11 +115,11 @@ var Promise = (function() {
// If you build a promise and pass in some data it's already resolved. // If you build a promise and pass in some data it's already resolved.
if (data != null) { if (data != null) {
this.isResolved = true; this.isResolved = true;
this.$data = data; this._data = data;
this.hasData = true; this.hasData = true;
} else { } else {
this.isResolved = false; this.isResolved = false;
this.$data = EMPTY_PROMISE; this._data = EMPTY_PROMISE;
} }
this.callbacks = []; this.callbacks = [];
}; };
@ -131,29 +131,29 @@ var Promise = (function() {
if (data === undefined) { if (data === undefined) {
return; return;
} }
if (this.$data !== EMPTY_PROMISE) { if (this._data !== EMPTY_PROMISE) {
throw "Promise " + this.name + ": Cannot set the data of a promise twice"; throw "Promise " + this.name + ": Cannot set the data of a promise twice";
} }
this.$data = data; this._data = data;
this.hasData = true; this.hasData = true;
if (this.$onDataCallback) { if (this.onDataCallback) {
this.$onDataCallback(data); this.onDataCallback(data);
} }
}, },
get data() { get data() {
if (this.$data === EMPTY_PROMISE) { if (this._data === EMPTY_PROMISE) {
throw "Promise " + this.name + ": Cannot get data that isn't set"; throw "Promise " + this.name + ": Cannot get data that isn't set";
} }
return this.$data; return this._data;
}, },
onData: function(callback) { onData: function(callback) {
if (this.$data !== EMPTY_PROMISE) { if (this._data !== EMPTY_PROMISE) {
callback(this.$data); callback(this._data);
} else { } else {
this.$onDataCallback = callback; this.onDataCallback = callback;
} }
}, },