We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 365f904 commit d815cd0Copy full SHA for d815cd0
lib/plots/canopy.js
@@ -86,7 +86,11 @@ export class Pannable extends Etch {
86
this.initialScale = 1
87
if (item.naturalHeight && item.naturalWidth && this.containerRect) {
88
// only scale down, not up:
89
- this.initalScale = Math.min(this.containerRect.width/item.naturalWidth, 1)
+ this.initialScale = Math.min(
90
+ this.containerRect.width/item.naturalWidth,
91
+ this.containerRect.height/item.naturalHeight,
92
+ 1
93
+ )
94
}
95
this.update()
96
0 commit comments