Merge pull request #140 from felizuno/now

Added OpenSeadragon.now() (#138)
This commit is contained in:
iangilman 2013-06-20 09:26:46 -07:00
commit 2e49d793e8

View File

@ -952,6 +952,20 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
},
/**
* Returns the current milliseconds, using Date.now() if available
* @name $.now
* @function
*/
now: function( ) {
if (Date.now) {
$.now = Date.now;
} else {
$.now = function() { return new Date().getTime(); };
}
},
/**
* Ensures an image is loaded correctly to support alpha transparency.
* Generally only IE has issues doing this correctly for formats like