- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在我的 angular4 应用程序中实现 openseadragon 缩放插件。
一切正常,但我无法显示原始图像大小,openseadragon 正在限制图像大小并将图像设置在中心,如果我像下面这样使用,
const viewer = OpenSeadragon({
id : 'seadragon-viewer',
prefixUrl : '//openseadragon.github.io/openseadragon/images/',
tileSources : this.primaryPicture.hiResInformation,
showFullPageControl: false,
showNavigator : true,
homeFillsViewer : false,
});
如果我使用 homeFillsViewer : true
则图像适合 div 但图像不适合裁剪后的图像。
我想显示图片的原始大小。
任何解决方案都会有所帮助,在此先感谢您。
最佳答案
您所说的原始尺寸是指您希望图像中的像素与屏幕上的像素一一对应吗?要确定缩放比例,您必须将查看器的大小与图像的大小进行比较并适当缩放。像这样:
viewer.addHandler('open', function() {
var tiledImage = viewer.world.getItemAt(0); // Assuming you just have a single image in the viewer
var targetZoom = tiledImage.source.dimensions.x / viewer.viewport.getContainerSize().x;
viewer.viewport.zoomTo(targetZoom, null, true);
});
关于angular - 如何在 openseadragon 中显示原始图像大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45706196/
当我添加收费栏(如本例中: http://openseadragon.github.io/examples/ui-toolbar/ )属性时,我收到错误无法读取 null 的属性“appendChil
我正在尝试使用 openseadragon (OSD) 版本 2.2.1 下载全尺寸的深度缩放图像。我的图像位于服务器上,我可以使用 OSD 打开它们。我下载它们的步骤是: 使用 将图像列表加载到正文
我正在尝试在 1) 生成各种事件(滚动、点击等)的定制 UI 设备和 2) OpenSeadragon 查看器之间实现一个接口(interface),以便可以使用外部设备来导航图像.设备发送可以在浏览
我第一次使用 OpenSeaDragon,我试图显示到控制台缩放级别和视口(viewport)中心。 现在我发现了如何在点击时显示坐标( Openseadragon image cordinates
在此先感谢您的帮助。我正在使用 openseadragon 库。主要思想是选择可缩放图像的部分并将它们复制到已定义的 Canvas 上。为了使这成为可能,我正在尝试使用函数 canvas.getcon
我正在构建一个响应式图像查看器,其中包含 OpenSeaDragon,它需要在不同的屏幕宽度下有不同的平移行为。在宽度较窄时,不应允许平移,但当窗口较宽时,应激活平移。 简化示例如下: 假设窗口相当宽
我想要一个 ReferenceStrip 的切换按钮(属性:showReferenceStrip)。即使变量在运行时更新,它也不会在视觉上更新。有什么办法可以更新吗? Toggle Preview
我正在尝试在我的 angular4 应用程序中实现 openseadragon 缩放插件。 一切正常,但我无法显示原始图像大小,openseadragon 正在限制图像大小并将图像设置在中心,如果我像
我正在尝试在我的 angular4 应用程序中实现 openseadragon 缩放插件。 一切正常,但我无法显示原始图像大小,openseadragon 正在限制图像大小并将图像设置在中心,如果我像
我正在使用带有 fabricjs 覆盖的 Openseadragon 库。我有一种情况,我想拖动 Canvas ,而不是鼠标主按钮,我想通过按下鼠标中键来拖动它。谁能帮我得到想要的行为? 最佳答案 O
我正在开发一个基于 OpenSeaDragon 的图库,我希望能够在收藏模式下使用叠加层。基于 OSD 网站 ( http://openseadragon.github.io/ ) 上的各种示例,我设
有没有办法为OpenSeaDragon中的ZoomIn按钮添加监听器?我不确定我的 ZoomIn 按钮是否被单击,因此我想用监听器拦截单击。 我查看了 API,但它似乎没有显示事件监听器列表。 最佳答
我想知道如何开始使用 OpenSeadragon。我根据 github 上的存储库自述文件通过 node.js 安装了它.然后我在看 API看起来您必须使用 OpenSeadragon.Viewer
var viewer = OpenSeadragon({ id: "openseadragon1", prefixUrl: "images/openseadragon/", s
我想向 nextButton 和 previousButton 添加一个单击事件监听器并获取当前图像(通过 viewer.source.getTileUrl() 执行此操作)。 但是,我收到 Type
Canvas 右键单击是否可以工作?我需要右键单击吗?当我单击鼠标右键时,我需要显示一些弹出窗口。是否可以?那怎么办? 最佳答案 您需要 canvas-nonprimary-press 处理程序,如下
OpenSeaDragon 太棒了。 如果我使用 Viewport#fitBounds JS 方法移动到一个新的矩形,并使用默认参数,它会“动画”当前 View 和新请求的边界之间的过渡。 有什么办法
我正在关注 Basic Single-Row Tile Source Collection具有与示例中提到的相同配置和图 block 源的示例。 我现在正尝试在第一张和第二张图片上添加叠加层,但遇到了
I don’t understand what the problem is, OpenSeaDragon doesn’t display the slide that I take from
我必须在我的 Vue 组件中使用一个名为“OpenSeadragon”的外部 javascript 库。 但是如何在我的 Vue 组件中加载这个组件呢?在我的父模板中,我加载了库: 这是我的 Vue
我是一名优秀的程序员,十分优秀!