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 PROJECT: openseadragon
BUILD_MAJOR: 0 BUILD_MAJOR: 0
BUILD_MINOR: 9 BUILD_MINOR: 9
BUILD_ID: 72 BUILD_ID: 74
BUILD: ${PROJECT}.${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID} BUILD: ${PROJECT}.${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_ID}
VERSION: ${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-toolbar' title='Toolbar | '/>
<publish page='ui-viewport-navigator' title='Viewport Navigator | '/> <publish page='ui-viewport-navigator' title='Viewport Navigator | '/>
<publish page='workspace-dzi' title='Workspace - DZI | '/>
<copy todir='${WWW}' file='openseadragon.js' /> <copy todir='${WWW}' file='openseadragon.js' />
</target> </target>

View File

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

View File

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

View File

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

View File

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

View File

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