Skip to content

Commit 92c9f90

Browse files
author
Lanny McNie
committed
Revert "Added CORS support to images generated by EaselJS."
This reverts commit 1c64dad.
1 parent 1c64dad commit 92c9f90

File tree

10 files changed

+6
-41
lines changed

10 files changed

+6
-41
lines changed

VERSIONS.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ Version NEXT [NOT RELEASED]
1212
- fixed touch/multitouch in IE11
1313
- fixed issue with -1 mouse pointers (thanks cubica)
1414
- fixed issue with AlphaMapFilter (thanks Dave)
15-
- added cross-origin (CORS) support for generated images.
16-
- included a sample htaccess file in /extras that can be used to serve CORS-safe images.
1715

1816

1917
Version 0.7.0 [September 25, 2013]

docs/easeljs_docs-NEXT.zip

35.9 KB
Binary file not shown.

examples/assets/preloadjs-NEXT.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extras/README.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

extras/sample.htaccess

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/easeljs-NEXT.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/easeljs/display/Bitmap.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ var p = Bitmap.prototype = new createjs.DisplayObject();
109109
this.DisplayObject_initialize();
110110
if (typeof imageOrUri == "string") {
111111
this.image = document.createElement("img");
112-
if (!this._isLocal(imageOrUri)) { this.image.crossOrigin = "Anonymous"; }
113112
this.image.src = imageOrUri;
114113
} else {
115114
this.image = imageOrUri;
@@ -211,18 +210,6 @@ var p = Bitmap.prototype = new createjs.DisplayObject();
211210
var hasContent = (this.image && (this.image.complete || this.image.getContext || this.image.readyState >= 2));
212211
return hasContent ? this._rectangle.initialize(0, 0, o.width, o.height) : null;
213212
};
214-
215-
/**
216-
* @method _isLocal
217-
* @param {String} path
218-
* @return {Boolean}
219-
* @protected
220-
*/
221-
p._isLocal = function(path) {
222-
var target = document.createElement("a");
223-
target.href = path;
224-
return target.hostname == "" && target.protocol == "file:";
225-
};
226213

227214
/**
228215
* Returns a clone of the Bitmap instance.

src/easeljs/display/Sprite.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ var p = Sprite.prototype = new createjs.DisplayObject();
6666
// events:
6767

6868
/**
69-
* Dispatched when an animation reaches its end.
69+
* Dispatched when an animation reaches its ends.
7070
* @event animationend
7171
* @param {Object} target The object that dispatched the event.
7272
* @param {String} type The event type.

src/easeljs/display/SpriteSheet.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ var p = SpriteSheet.prototype = new createjs.EventDispatcher();
263263
if (typeof img == "string") {
264264
var src = img;
265265
img = document.createElement("img");
266-
if (!this._isLocal(src) && img.crossOrigin === "") { img.crossOrigin = "Anonymous"; }
267266
img.src = src;
268267
}
269268
a.push(img);
@@ -470,17 +469,5 @@ var p = SpriteSheet.prototype = new createjs.EventDispatcher();
470469
this._numFrames = ttlFrames;
471470
};
472471

473-
/**
474-
* @method _isLocal
475-
* @param {String} path
476-
* @return {Boolean}
477-
* @protected
478-
*/
479-
p._isLocal = function(path) {
480-
var target = document.createElement("a");
481-
target.href = path;
482-
return target.hostname == "" && target.protocol == "file:";
483-
};
484-
485472
createjs.SpriteSheet = SpriteSheet;
486473
}());

src/easeljs/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ this.createjs = this.createjs || {};
2727
* @type String
2828
* @static
2929
**/
30-
s.buildDate = /*date*/"Mon, 09 Dec 2013 21:40:56 GMT"; // injected by build process
30+
s.buildDate = /*date*/"Thu, 05 Dec 2013 22:43:21 GMT"; // injected by build process
3131

3232
})();

0 commit comments

Comments
 (0)