Browse Source

Merge pull request #722 from kkujala/master

Name a few anonymous functions.
Andreas Gal 14 years ago
parent
commit
eed0773259
  1. 8
      src/pattern.js
  2. 2
      src/stream.js
  3. 8
      src/util.js

8
src/pattern.js

@ -97,7 +97,7 @@ Shadings.RadialAxial = (function radialAxialShading() {
this.colorStops = colorStops; this.colorStops = colorStops;
} }
constructor.fromIR = function(ctx, raw) { constructor.fromIR = function radialAxialShadingGetIR(ctx, raw) {
var type = raw[1]; var type = raw[1];
var colorStops = raw[2]; var colorStops = raw[2];
var p0 = raw[3]; var p0 = raw[3];
@ -129,7 +129,7 @@ Shadings.RadialAxial = (function radialAxialShading() {
} }
constructor.prototype = { constructor.prototype = {
getIR: function RadialAxialShading_getIR() { getIR: function radialAxialShadingGetIR() {
var coordsArr = this.coordsArr; var coordsArr = this.coordsArr;
var type = this.shadingType; var type = this.shadingType;
if (type == 2) { if (type == 2) {
@ -164,12 +164,12 @@ Shadings.Dummy = (function dummyShading() {
this.type = 'Pattern'; this.type = 'Pattern';
} }
constructor.fromIR = function() { constructor.fromIR = function dummyShadingFromIR() {
return 'hotpink'; return 'hotpink';
} }
constructor.prototype = { constructor.prototype = {
getIR: function dummpy_getir() { getIR: function dummyShadingGetIR() {
return ['Dummy']; return ['Dummy'];
} }
}; };

2
src/stream.js

@ -801,7 +801,7 @@ var JpegStream = (function jpegStream() {
} }
constructor.prototype = { constructor.prototype = {
getIR: function() { getIR: function jpegStreamGetIR() {
return this.src; return this.src;
}, },
getChar: function jpegStreamGetChar() { getChar: function jpegStreamGetChar() {

8
src/util.js

@ -197,7 +197,7 @@ function isPDFFunction(v) {
* can be set. If any of these happens twice or the data is required before * can be set. If any of these happens twice or the data is required before
* it was set, an exception is throw. * it was set, an exception is throw.
*/ */
var Promise = (function() { var Promise = (function promise() {
var EMPTY_PROMISE = {}; var EMPTY_PROMISE = {};
/** /**
@ -244,7 +244,7 @@ var Promise = (function() {
return this._data; return this._data;
}, },
onData: function(callback) { onData: function promiseOnData(callback) {
if (this._data !== EMPTY_PROMISE) { if (this._data !== EMPTY_PROMISE) {
callback(this._data); callback(this._data);
} else { } else {
@ -252,7 +252,7 @@ var Promise = (function() {
} }
}, },
resolve: function(data) { resolve: function promiseResolve(data) {
if (this.isResolved) { if (this.isResolved) {
throw 'A Promise can be resolved only once ' + this.name; throw 'A Promise can be resolved only once ' + this.name;
} }
@ -266,7 +266,7 @@ var Promise = (function() {
} }
}, },
then: function(callback) { then: function promiseThen(callback) {
if (!callback) { if (!callback) {
throw 'Requiring callback' + this.name; throw 'Requiring callback' + this.name;
} }

Loading…
Cancel
Save