]> git.parisson.com Git - pdf.js.git/commitdiff
Remove $ from property names.
authorJulian Viereck <julian.viereck@gmail.com>
Sat, 1 Oct 2011 15:16:11 +0000 (17:16 +0200)
committerJulian Viereck <julian.viereck@gmail.com>
Sun, 2 Oct 2011 10:16:11 +0000 (12:16 +0200)
fonts.js
worker.js

index da8082fc55aaec5709b2109dd94c98165ee887aa..1fb7577b12f84a8b2a844db4ed52e34c6177f19a 100755 (executable)
--- a/fonts.js
+++ b/fonts.js
@@ -501,8 +501,8 @@ var FontShape = (function FontShape() {
     var italic = this.italic ? 'italic' : 'normal';
     this.fontFallback = this.serif ? 'serif' : 'sans-serif';
 
-    this.$name1 = italic + ' ' + bold + ' ';
-    this.$name2 = 'px "' + name + '", "';
+    this.namePart1 = italic + ' ' + bold + ' ';
+    this.namePart2 = 'px "' + name + '", "';
     
     this.supported = Object.keys(this.encoding).length != 0;
 
@@ -517,7 +517,7 @@ var FontShape = (function FontShape() {
   constructor.prototype = {
     getRule: function fonts_getRule(size, fallback) {
       fallback = fallback || this.fontFallback;
-      return this.$name1 + size + this.$name2 + fallback + '"';
+      return this.namePart1 + size + this.namePart2 + fallback + '"';
     },
     
     charsToUnicode: function fonts_chars2Unicode(chars) {
index b7347050b03a0f12af3e22478c16acfe31aba09c..deded8eb8592133f557e425b19274c0f70c89ddc 100644 (file)
--- a/worker.js
+++ b/worker.js
@@ -115,11 +115,11 @@ var Promise = (function() {
     // If you build a promise and pass in some data it's already resolved.
     if (data != null) {
       this.isResolved = true;
-      this.$data = data;
+      this._data = data;
       this.hasData = true;
     } else {
       this.isResolved = false;      
-      this.$data = EMPTY_PROMISE;
+      this._data = EMPTY_PROMISE;
     }
     this.callbacks = [];
   };
@@ -131,29 +131,29 @@ var Promise = (function() {
       if (data === undefined) {
         return;
       }
-      if (this.$data !== EMPTY_PROMISE) {
+      if (this._data !== EMPTY_PROMISE) {
         throw "Promise " + this.name + ": Cannot set the data of a promise twice";
       }
-      this.$data = data;
+      this._data = data;
       this.hasData = true;
 
-      if (this.$onDataCallback) {
-        this.$onDataCallback(data);
+      if (this.onDataCallback) {
+        this.onDataCallback(data);
       }
     },
     
     get data() {
-      if (this.$data === EMPTY_PROMISE) {
+      if (this._data === EMPTY_PROMISE) {
         throw "Promise " + this.name + ": Cannot get data that isn't set";
       }
-      return this.$data;
+      return this._data;
     },
 
     onData: function(callback) {
-      if (this.$data !== EMPTY_PROMISE) {
-        callback(this.$data);
+      if (this._data !== EMPTY_PROMISE) {
+        callback(this._data);
       } else {
-        this.$onDataCallback = callback;
+        this.onDataCallback = callback;
       }
     },