[英]Turn off scaling in Galleria
When Galleria is in fullscreen mode, I want it to display images pixel-for-pixel, ie with no scaling at all. 当Galleria处于全屏模式时,我希望它以像素为单位显示图像,即完全没有缩放比例。
My initial plan was to do this by both: 我最初的计划是通过两种方式做到这一点:
fullscreenCrop: false
, because the docs say that, " false will scale down so the entire image fits", and fullscreenCrop: false
,因为文档说:“ false将按比例缩小以便整个图像合适”,并且 Unfortunately: 不幸:
Given all this, please can you suggest how I might achieve my objective? 有鉴于此,请您能提出我如何实现目标的建议?
You can prevent scaling by adding these two options: 您可以通过添加以下两个选项来防止扩展:
maxScaleRatio: 1
minScaleRatio: 1
You probably only need the first one to prevent upscale. 您可能只需要第一个即可防止升级。 But the second one prevents downscale as well.
但是第二个也可以防止尺寸缩小。 Read more: http://galleria.io/docs/options/maxScaleRatio/
了解更多: http : //galleria.io/docs/options/maxScaleRatio/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.