将选择插件添加到我的 OpenSeadragon 项目中,它已经与基本功能配合得很好,我确实启动了它,但是更改所选区域的大小出现了问题。是这样显示的:-
这是我为启动它所做的。
var openSeadragon, selection;
document.addEventListener('DOMContentLoaded', function() {
openSeadragon = OpenSeadragon({
id: "openSeadragon1",
prefixUrl: "images/",
tileSources: [],
sequenceMode: true,
showReferenceStrip: true,
visibilityRatio: 0.2,
constrainDuringPan: true,
defaultZoomLevel: 0.8,
minZoomLevel: 0.3,
maxZoomLevel: 10,
showNavigator: true,
nextButton: "next",
previousButton: "previous",
minZoomImageRatio: 0.1, //of viewer size
crossOriginPolicy: 'Anonymous',
});
selection = openSeadragon.selection({
onSelection: function(rect) {
alert(rect + ' Center point: ' + rect.getCenter() + ' Degree rotation: ' + rect.getDegreeRotation());
}
});
如何解决?