mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-23 13:46:09 +03:00
Merge pull request #2606 from pearcetm/viewerMargins
Fix problem with asymmetric viewport margins in webgl drawer
This commit is contained in:
commit
faf6d19db5
@ -255,9 +255,10 @@
|
|||||||
*/
|
*/
|
||||||
draw(tiledImages){
|
draw(tiledImages){
|
||||||
let gl = this._gl;
|
let gl = this._gl;
|
||||||
|
const bounds = this.viewport.getBoundsNoRotateWithMargins(true);
|
||||||
let view = {
|
let view = {
|
||||||
bounds: this.viewport.getBoundsNoRotateWithMargins(true),
|
bounds: bounds,
|
||||||
center: this.viewport.getCenter(true),
|
center: new OpenSeadragon.Point(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2),
|
||||||
rotation: this.viewport.getRotation(true) * Math.PI / 180
|
rotation: this.viewport.getRotation(true) * Math.PI / 180
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,10 +19,10 @@ const drawers = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const viewportMargins = {
|
const viewportMargins = {
|
||||||
left: 25,
|
left: 100,
|
||||||
top: 25,
|
top: 0,
|
||||||
right: 25,
|
right: 0,
|
||||||
bottom: 25,
|
bottom: 50,
|
||||||
};
|
};
|
||||||
|
|
||||||
//Support drawer type from the url
|
//Support drawer type from the url
|
||||||
|
Loading…
Reference in New Issue
Block a user