mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
Resolved suggestions
- Avoid useless parameters _navigatorRotate since it already exists within the navigator; - Automatically rotate the image in the demo page.
This commit is contained in:
parent
d897e5454f
commit
7fb5744495
@ -224,8 +224,6 @@ $.Navigator = function( options ){
|
|||||||
this.displayRegionContainer.appendChild(this.displayRegion);
|
this.displayRegionContainer.appendChild(this.displayRegion);
|
||||||
this.element.getElementsByTagName('div')[0].appendChild(this.displayRegionContainer);
|
this.element.getElementsByTagName('div')[0].appendChild(this.displayRegionContainer);
|
||||||
|
|
||||||
this._navigatorRotate = options.navigatorRotate;
|
|
||||||
|
|
||||||
function rotate(degrees, immediately) {
|
function rotate(degrees, immediately) {
|
||||||
_setTransformRotate(_this.displayRegionContainer, degrees);
|
_setTransformRotate(_this.displayRegionContainer, degrees);
|
||||||
_setTransformRotate(_this.displayRegion, -degrees);
|
_setTransformRotate(_this.displayRegion, -degrees);
|
||||||
@ -399,7 +397,7 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /*
|
|||||||
bottomright = this.viewport.pixelFromPointNoRotate(bounds.getBottomRight(), false)
|
bottomright = this.viewport.pixelFromPointNoRotate(bounds.getBottomRight(), false)
|
||||||
.minus( this.totalBorderWidths );
|
.minus( this.totalBorderWidths );
|
||||||
|
|
||||||
if (!this._navigatorRotate) {
|
if (!this.navigatorRotate) {
|
||||||
var degrees = viewport.getRotation(true);
|
var degrees = viewport.getRotation(true);
|
||||||
_setTransformRotate(this.displayRegion, -degrees);
|
_setTransformRotate(this.displayRegion, -degrees);
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="contentDiv" class="openseadragon1"></div>
|
<div id="contentDiv" class="openseadragon1"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
var viewer = OpenSeadragon({
|
var viewer = OpenSeadragon({
|
||||||
// debugMode: true,
|
// debugMode: true,
|
||||||
id: "contentDiv",
|
id: "contentDiv",
|
||||||
@ -29,6 +28,7 @@
|
|||||||
showNavigator: true,
|
showNavigator: true,
|
||||||
navigatorRotate: false
|
navigatorRotate: false
|
||||||
});
|
});
|
||||||
|
viewer.viewport.setRotation(45)
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user