mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 22:56:11 +03:00
Merged changes from master
This commit is contained in:
commit
bbedbd29cb
@ -35,6 +35,7 @@ OPENSEADRAGON CHANGELOG
|
|||||||
* Button: 'enter', 'exit', 'press', 'release', 'focus', 'blur', 'click'
|
* Button: 'enter', 'exit', 'press', 'release', 'focus', 'blur', 'click'
|
||||||
* Fixed: IE 10 not reading DZI file correctly in certain circumstances (#218)
|
* Fixed: IE 10 not reading DZI file correctly in certain circumstances (#218)
|
||||||
* Added support for the 'wheel' DOM mousewheel event (#261)
|
* Added support for the 'wheel' DOM mousewheel event (#261)
|
||||||
|
* Fix for non-canvas tile rendering at large size (#264)
|
||||||
|
|
||||||
0.9.131:
|
0.9.131:
|
||||||
|
|
||||||
|
30
src/tile.js
30
src/tile.js
@ -54,8 +54,9 @@
|
|||||||
* this tile failed to load?
|
* this tile failed to load?
|
||||||
* @property {String} url The URL of this tile's image.
|
* @property {String} url The URL of this tile's image.
|
||||||
* @property {Boolean} loaded Is this tile loaded?
|
* @property {Boolean} loaded Is this tile loaded?
|
||||||
* @property {Boolean} loading Is this tile loading
|
* @property {Boolean} loading Is this tile loading?
|
||||||
* @property {Element} element The HTML element for this tile
|
* @property {Element} element The HTML div element for this tile
|
||||||
|
* @property {Element} imgElement The HTML img element for this tile
|
||||||
* @property {Image} image The Image object for this tile
|
* @property {Image} image The Image object for this tile
|
||||||
* @property {String} style The alias of this.element.style.
|
* @property {String} style The alias of this.element.style.
|
||||||
* @property {String} position This tile's position on screen, in pixels.
|
* @property {String} position This tile's position on screen, in pixels.
|
||||||
@ -78,6 +79,7 @@ $.Tile = function(level, x, y, bounds, exists, url) {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
||||||
this.element = null;
|
this.element = null;
|
||||||
|
this.imgElement = null;
|
||||||
this.image = null;
|
this.image = null;
|
||||||
|
|
||||||
this.style = null;
|
this.style = null;
|
||||||
@ -122,9 +124,12 @@ $.Tile.prototype = {
|
|||||||
// content during animation of the container size.
|
// content during animation of the container size.
|
||||||
|
|
||||||
if ( !this.element ) {
|
if ( !this.element ) {
|
||||||
this.element = $.makeNeutralElement("img");
|
this.element = $.makeNeutralElement( "div" );
|
||||||
this.element.src = this.url;
|
this.imgElement = $.makeNeutralElement( "img" );
|
||||||
this.element.style.msInterpolationMode = "nearest-neighbor";
|
this.imgElement.src = this.url;
|
||||||
|
this.imgElement.style.msInterpolationMode = "nearest-neighbor";
|
||||||
|
this.imgElement.style.width = "100%";
|
||||||
|
this.imgElement.style.height = "100%";
|
||||||
|
|
||||||
this.style = this.element.style;
|
this.style = this.element.style;
|
||||||
this.style.position = "absolute";
|
this.style.position = "absolute";
|
||||||
@ -132,6 +137,9 @@ $.Tile.prototype = {
|
|||||||
if ( this.element.parentNode != container ) {
|
if ( this.element.parentNode != container ) {
|
||||||
container.appendChild( this.element );
|
container.appendChild( this.element );
|
||||||
}
|
}
|
||||||
|
if ( this.imgElement.parentNode != this.element ) {
|
||||||
|
this.element.appendChild( this.imgElement );
|
||||||
|
}
|
||||||
|
|
||||||
this.style.top = this.position.y + "px";
|
this.style.top = this.position.y + "px";
|
||||||
this.style.left = this.position.x + "px";
|
this.style.left = this.position.x + "px";
|
||||||
@ -216,6 +224,9 @@ $.Tile.prototype = {
|
|||||||
* @function
|
* @function
|
||||||
*/
|
*/
|
||||||
unload: function() {
|
unload: function() {
|
||||||
|
if ( this.imgElement && this.imgElement.parentNode ) {
|
||||||
|
this.imgElement.parentNode.removeChild( this.imgElement );
|
||||||
|
}
|
||||||
if ( this.element && this.element.parentNode ) {
|
if ( this.element && this.element.parentNode ) {
|
||||||
this.element.parentNode.removeChild( this.element );
|
this.element.parentNode.removeChild( this.element );
|
||||||
}
|
}
|
||||||
@ -223,10 +234,11 @@ $.Tile.prototype = {
|
|||||||
delete TILE_CACHE[ this.url ];
|
delete TILE_CACHE[ this.url ];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.element = null;
|
this.element = null;
|
||||||
this.image = null;
|
this.imgElement = null;
|
||||||
this.loaded = false;
|
this.image = null;
|
||||||
this.loading = false;
|
this.loaded = false;
|
||||||
|
this.loading = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user