changing drawHTML routine to avoid ie rendering issue

This commit is contained in:
thatcher 2013-02-01 15:18:53 -05:00
parent 1638790370
commit f863f5fcae
7 changed files with 42 additions and 44 deletions

View File

@ -6,7 +6,7 @@
PROJECT: openseadragon
BUILD_MAJOR: 0
BUILD_MINOR: 9
BUILD_ID: 95
BUILD_ID: 96
BUILD: ${PROJECT}.${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}
VERSION: ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}

View File

@ -1,7 +1,7 @@
/*globals OpenSeadragon */
/**
* @version OpenSeadragon 0.9.95
* @version OpenSeadragon 0.9.96
*
* @fileOverview
* <h2>
@ -471,8 +471,8 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
//INTERFACE FEATURES
animationTime: 1.5,
blendTime: 0.1,
alwaysBlend: false,
blendTime: 0.5,
alwaysBlend: true,
autoHideControls: true,
immediateRender: false,
wrapHorizontal: false,
@ -7726,13 +7726,9 @@ $.Tile.prototype = {
// content during animation of the container size.
if ( !this.element ) {
this.element = $.makeNeutralElement("div");
this.image = $.makeNeutralElement("img");
this.image.src = this.url;
this.image.style.height = '100%';
this.image.style.width = '100%';
this.image.style.msInterpolationMode = "nearest-neighbor";
this.element.appendChild( this.image );
this.element = $.makeNeutralElement("img");
this.element.src = this.url;
this.element.style.msInterpolationMode = "nearest-neighbor";
this.style = this.element.style;
this.style.position = "absolute";
@ -7746,7 +7742,7 @@ $.Tile.prototype = {
this.style.height = 100 * ( this.size.y / containerSize.y ) + "%";
this.style.width = 100 * ( this.size.x / containerSize.x ) + "%";
$.setElementOpacity( this.image, this.opacity );
$.setElementOpacity( this.element, this.opacity );
},
@ -8945,14 +8941,6 @@ function drawTiles( drawer, lastDrawn ){
for ( i = lastDrawn.length - 1; i >= 0; i-- ) {
tile = lastDrawn[ i ];
if( drawer.debugMode ){
try{
drawDebugInfo( drawer, tile, lastDrawn.length, i );
}catch(e){
$.console.error(e);
}
}
//We dont actually 'draw' a collection tile, rather its used to house
//an overlay which does the drawing in its own viewport
@ -9021,8 +9009,17 @@ function drawTiles( drawer, lastDrawn ){
tile.drawHTML( drawer.canvas );
}
tile.beingDrawn = true;
}
if( drawer.debugMode ){
try{
drawDebugInfo( drawer, tile, lastDrawn.length, i );
}catch(e){
$.console.error(e);
}
}
}
}
@ -9031,7 +9028,7 @@ function drawDebugInfo( drawer, tile, count, i ){
if ( USE_CANVAS ) {
drawer.context.lineWidth = 2;
drawer.context.font = 'small-caps bold 12px ariel';
drawer.context.font = 'small-caps bold 13px ariel';
drawer.context.strokeStyle = drawer.debugGridColor;
drawer.context.fillStyle = drawer.debugGridColor;
drawer.context.strokeRect(

View File

@ -960,14 +960,6 @@ function drawTiles( drawer, lastDrawn ){
for ( i = lastDrawn.length - 1; i >= 0; i-- ) {
tile = lastDrawn[ i ];
if( drawer.debugMode ){
try{
drawDebugInfo( drawer, tile, lastDrawn.length, i );
}catch(e){
$.console.error(e);
}
}
//We dont actually 'draw' a collection tile, rather its used to house
//an overlay which does the drawing in its own viewport
@ -1036,8 +1028,17 @@ function drawTiles( drawer, lastDrawn ){
tile.drawHTML( drawer.canvas );
}
tile.beingDrawn = true;
}
if( drawer.debugMode ){
try{
drawDebugInfo( drawer, tile, lastDrawn.length, i );
}catch(e){
$.console.error(e);
}
}
}
}
@ -1046,7 +1047,7 @@ function drawDebugInfo( drawer, tile, count, i ){
if ( USE_CANVAS ) {
drawer.context.lineWidth = 2;
drawer.context.font = 'small-caps bold 12px ariel';
drawer.context.font = 'small-caps bold 13px ariel';
drawer.context.strokeStyle = drawer.debugGridColor;
drawer.context.fillStyle = drawer.debugGridColor;
drawer.context.strokeRect(

View File

@ -471,8 +471,8 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
//INTERFACE FEATURES
animationTime: 1.5,
blendTime: 0.1,
alwaysBlend: false,
blendTime: 0.5,
alwaysBlend: true,
autoHideControls: true,
immediateRender: false,
wrapHorizontal: false,

View File

@ -113,13 +113,9 @@ $.Tile.prototype = {
// content during animation of the container size.
if ( !this.element ) {
this.element = $.makeNeutralElement("div");
this.image = $.makeNeutralElement("img");
this.image.src = this.url;
this.image.style.height = '100%';
this.image.style.width = '100%';
this.image.style.msInterpolationMode = "nearest-neighbor";
this.element.appendChild( this.image );
this.element = $.makeNeutralElement("img");
this.element.src = this.url;
this.element.style.msInterpolationMode = "nearest-neighbor";
this.style = this.element.style;
this.style.position = "absolute";
@ -133,7 +129,7 @@ $.Tile.prototype = {
this.style.height = 100 * ( this.size.y / containerSize.y ) + "%";
this.style.width = 100 * ( this.size.x / containerSize.x ) + "%";
$.setElementOpacity( this.image, this.opacity );
$.setElementOpacity( this.element, this.opacity );
},

View File

@ -22,7 +22,10 @@
prefixUrl: "/openseadragon/images/",
tileSources: "/openseadragon/examples/images/highsmith/highsmith.js",
showNavigator: false,
debugMode: true
debugMode: true,
//debugGridColor: "#f9276f",
//minZoomImageRatio: 0,
//maxZoomPixelRatio: 10000
});
</script>

View File

@ -175,7 +175,7 @@ OpenSeadragon({
collectionMode: true,
collectionRows: 2,
collectionTileSize: 1024,
collectionTileMargin: 256,
collectionTileMargin: 512,
collectionLayout: 'vertical',
//panVertical: false,
@ -204,7 +204,7 @@ OpenSeadragon({
<!--
<div class="description">
<h3>Multirow, mixed tile source collection.</h3>
<p>
@ -697,4 +697,5 @@ OpenSeadragon({
}]
}]
});
</script>
</script>
-->