您好我曾尝试为木瓜查看器实施PAN工具但没有运气,我想出了这两个功能
papaya.viewer.Viewer.prototype.setCurrentPanLocation = function (xLoc, yLoc, sliceDirection) {
和
papaya.viewer.Viewer.prototype.setStartPanLocation = function (xLoc, yLoc, sliceDirection) {
任何人帮助
答案 0 :(得分:0)
详细研究后终于找到答案
this.previousMousePosition.x = papaya.utilities.PlatformUtils.getMousePositionX(me);
this.previousMousePosition.y = papaya.utilities.PlatformUtils.getMousePositionY(me);
// this.setStartPanLocationNew(Cord1.x, Cord1.y, this.mainImage.sliceDirection);
this.setStartPanLocationNew(
this.convertScreenToImageCoordinateX(this.previousMousePosition.x, this.mainImage),
this.convertScreenToImageCoordinateY(this.previousMousePosition.y, this.mainImage),
this.mainImage.sliceDirection
);