found error related to minPixelWidth being set incorrectly for navigator and image reference strip so it loaded too many level which hurt performance

This commit is contained in:
thatcher 2012-09-07 08:55:19 -04:00
parent 79d048ac81
commit e7785fe636
7 changed files with 30 additions and 66 deletions

View File

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

View File

@ -71,6 +71,8 @@
<publish page='ui-toolbar' title='Toolbar | '/>
<publish page='ui-viewport-navigator' title='Viewport Navigator | '/>
<publish page='workspace-dzi' title='Workspace - DZI | '/>
<copy todir='${WWW}' file='openseadragon.js' />
</target>

View File

@ -1,5 +1,5 @@
/**
* @version OpenSeadragon 0.9.72
* @version OpenSeadragon 0.9.74
*
* @fileOverview
* <h2>
@ -495,7 +495,7 @@ OpenSeadragon = window.OpenSeadragon || function( options ){
navigatorHeight: null,
navigatorWidth: null,
navigatorPosition: null,
navigatorSizeRatio: 0.25,
navigatorSizeRatio: 0.2,
preserveViewport: false,
defaultZoomLevel: 0,
@ -505,7 +505,7 @@ OpenSeadragon = window.OpenSeadragon || function( options ){
referenceStripHeight: null,
referenceStripWidth: null,
referenceStripPosition: 'BOTTOM_LEFT',
referenceStripSizeRatio: 0.25,
referenceStripSizeRatio: 0.2,
//COLLECTION VISUALIZATION SETTINGS
collectionRows: 3,
@ -4686,10 +4686,7 @@ $.Navigator = function( options ){
showSequenceControl: false
});
options.minPixelRatio = Math.min(
options.navigatorSizeRatio * $.DEFAULT_SETTINGS.minPixelRatio,
$.DEFAULT_SETTINGS.minPixelRatio
);
options.minPixelRatio = this.minPixelRatio = viewer.minPixelRatio;
(function( style ){
style.marginTop = '0px';
@ -6808,11 +6805,7 @@ $.ReferenceStrip = function( options ){
"animating": false
};
minPixelRatio = Math.min(
options.sizeRatio * $.DEFAULT_SETTINGS.minPixelRatio,
$.DEFAULT_SETTINGS.minPixelRatio
);
this.minPixelRatio = minPixelRatio;
this.minPixelRatio = this.viewer.minPixelRatio;
(function( style ){
style.marginTop = '0px';
@ -6823,10 +6816,11 @@ $.ReferenceStrip = function( options ){
style.bottom = '0px';
style.border = '1px solid #555';
style.background = '#000';
//style.opacity = 0.8;
style.position = 'relative';
}( this.element.style ));
$.setElementOpacity( this.element, 0.8 );
this.viewer = viewer;
this.innerTracker = new $.MouseTracker({
element: this.element,
@ -6895,13 +6889,13 @@ $.ReferenceStrip = function( options ){
element.id = this.element.id + "-" + i;
(function(style){
style.width = this.panelWidth + 'px';
style.height = this.panelHeight + 'px';
style.width = _this.panelWidth + 'px';
style.height = _this.panelHeight + 'px';
style.display = 'inline';
style.float = 'left'; //Webkit
style.cssFloat = 'left'; //Firefox
style.styleFloat = 'left'; //IE
style.border = '2px solid #000';
style.padding = '2px';
style.background = 'inherit';
}(element.style));
@ -7104,23 +7098,10 @@ function loadPanels(strip, viewerSize, scroll){
style.cursor = 'default';
style.width = ( strip.panelWidth - 4 ) + 'px';
style.height = ( strip.panelHeight - 4 ) + 'px';
style.border = '2px solid #000';
}( miniViewer.displayRegion.style ));
miniViewer.displayRegion.innerTracker = new $.MouseTracker({
element: miniViewer.displayRegion/*,
focusHandler: function(){
//tracker.element.style.border = '2px solid #437AB2';
if( strip.currentSelected !== tracker.element ){
tracker.element.style.background = '#ddd';
}
},
blurHandler: function(){
//tracker.element.style.border = '2px solid #000';
if( strip.currentSelected !== tracker.element ){
tracker.element.style.background = '#000';
}
}*/
element: miniViewer.displayRegion
});
element.getElementsByTagName('form')[ 0 ].appendChild(
@ -8063,11 +8044,11 @@ function updateViewport( drawer ) {
)
),
highestLevel = Math.min(
drawer.source.maxLevel,
Math.floor(
Math.abs(drawer.source.maxLevel),
Math.abs(Math.floor(
Math.log( zeroRatioC / drawer.minPixelRatio ) /
Math.log( 2 )
)
))
),
renderPixelRatioC,
renderPixelRatioT,

View File

@ -362,11 +362,11 @@ function updateViewport( drawer ) {
)
),
highestLevel = Math.min(
drawer.source.maxLevel,
Math.floor(
Math.abs(drawer.source.maxLevel),
Math.abs(Math.floor(
Math.log( zeroRatioC / drawer.minPixelRatio ) /
Math.log( 2 )
)
))
),
renderPixelRatioC,
renderPixelRatioT,

View File

@ -40,10 +40,7 @@ $.Navigator = function( options ){
showSequenceControl: false
});
options.minPixelRatio = Math.min(
options.navigatorSizeRatio * $.DEFAULT_SETTINGS.minPixelRatio,
$.DEFAULT_SETTINGS.minPixelRatio
);
options.minPixelRatio = this.minPixelRatio = viewer.minPixelRatio;
(function( style ){
style.marginTop = '0px';

View File

@ -495,7 +495,7 @@ OpenSeadragon = window.OpenSeadragon || function( options ){
navigatorHeight: null,
navigatorWidth: null,
navigatorPosition: null,
navigatorSizeRatio: 0.25,
navigatorSizeRatio: 0.2,
preserveViewport: false,
defaultZoomLevel: 0,
@ -505,7 +505,7 @@ OpenSeadragon = window.OpenSeadragon || function( options ){
referenceStripHeight: null,
referenceStripWidth: null,
referenceStripPosition: 'BOTTOM_LEFT',
referenceStripSizeRatio: 0.25,
referenceStripSizeRatio: 0.2,
//COLLECTION VISUALIZATION SETTINGS
collectionRows: 3,

View File

@ -64,11 +64,7 @@ $.ReferenceStrip = function( options ){
"animating": false
};
minPixelRatio = Math.min(
options.sizeRatio * $.DEFAULT_SETTINGS.minPixelRatio,
$.DEFAULT_SETTINGS.minPixelRatio
);
this.minPixelRatio = minPixelRatio;
this.minPixelRatio = this.viewer.minPixelRatio;
(function( style ){
style.marginTop = '0px';
@ -79,10 +75,11 @@ $.ReferenceStrip = function( options ){
style.bottom = '0px';
style.border = '1px solid #555';
style.background = '#000';
//style.opacity = 0.8;
style.position = 'relative';
}( this.element.style ));
$.setElementOpacity( this.element, 0.8 );
this.viewer = viewer;
this.innerTracker = new $.MouseTracker({
element: this.element,
@ -151,13 +148,13 @@ $.ReferenceStrip = function( options ){
element.id = this.element.id + "-" + i;
(function(style){
style.width = this.panelWidth + 'px';
style.height = this.panelHeight + 'px';
style.width = _this.panelWidth + 'px';
style.height = _this.panelHeight + 'px';
style.display = 'inline';
style.float = 'left'; //Webkit
style.cssFloat = 'left'; //Firefox
style.styleFloat = 'left'; //IE
style.border = '2px solid #000';
style.padding = '2px';
style.background = 'inherit';
}(element.style));
@ -360,23 +357,10 @@ function loadPanels(strip, viewerSize, scroll){
style.cursor = 'default';
style.width = ( strip.panelWidth - 4 ) + 'px';
style.height = ( strip.panelHeight - 4 ) + 'px';
style.border = '2px solid #000';
}( miniViewer.displayRegion.style ));
miniViewer.displayRegion.innerTracker = new $.MouseTracker({
element: miniViewer.displayRegion/*,
focusHandler: function(){
//tracker.element.style.border = '2px solid #437AB2';
if( strip.currentSelected !== tracker.element ){
tracker.element.style.background = '#ddd';
}
},
blurHandler: function(){
//tracker.element.style.border = '2px solid #000';
if( strip.currentSelected !== tracker.element ){
tracker.element.style.background = '#000';
}
}*/
element: miniViewer.displayRegion
});
element.getElementsByTagName('form')[ 0 ].appendChild(