Task #7863 (closed)
Bug: panoJs thumb ROI
Reported by: | wmoore | Owned by: | cxallan |
---|---|---|---|
Priority: | major | Milestone: | OMERO-4.4 |
Component: | Web | Version: | n.a. |
Keywords: | n.a. | Cc: | atarkowska, cxallan |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2012-02-28 (9) |
Description
For large images, the red ROI on the viewer thumbnail goes elongated.
This is fixed with the following edit. Not sure where to push this? Chris?
jrs-macbookpro-25107:OMERO will$ git diff diff --git a/components/tools/OmeroWeb/omeroweb/webgateway/static/webgateway/js/3rdparty/panojs/control_thumbnail.js b/components/tools/OmeroWeb/omeroweb/webgateway/static/webgateway/js/3rdparty/panojs/control_thumbnail.js index f7d4f8d..096796d 100755 --- a/components/tools/OmeroWeb/omeroweb/webgateway/static/webgateway/js/3rdparty/panojs/control_thumbnail.js +++ b/components/tools/OmeroWeb/omeroweb/webgateway/static/webgateway/js/3rdparty/panojs/control_thumbnail.js @@ -182,13 +182,13 @@ ThumbnailControl.prototype.viewerMoved = function(e) { this.dom_roi.style.left = tx + 'px'; this.dom_roi.style.top = ty + 'px'; - this.dom_roi.style.width = Math.min(w*this.thumbscale-2, this.tw-tx-PanoJS.CONTROL_THUMBNAIL_BORDER) + 'px'; - this.dom_roi.style.height = Math.min(h*this.thumbscale-2, this.th-ty-PanoJS.CONTROL_THUMBNAIL_BORDER) + 'px'; + this.dom_roi.style.width = trim(1, w*this.thumbscale-2, this.tw-tx-PanoJS.CONTROL_THUMBNAIL_BORDER) + 'px'; + this.dom_roi.style.height = trim(1, h*this.thumbscale-2, this.th-ty-PanoJS.CONTROL_THUMBNAIL_BORDER) + 'px'; this.dom_roi_prev.style.left = tx + 'px'; this.dom_roi_prev.style.top = ty + 'px'; - this.dom_roi_prev.style.width = Math.min(w*this.thumbscale-2, this.tw-tx-PanoJS.CONTROL_THUMBNAIL_BORDER) + 'px'; - this.dom_roi_prev.style.height = Math.min(h*this.thumbscale-2, this.th-ty-PanoJS.CONTROL_THUMBNAIL_BORDER) + 'px'; + this.dom_roi_prev.style.width = trim(1, w*this.thumbscale-2, this.tw-tx-PanoJS.CONTROL_THUMBNAIL_BORDER) + 'px'; + this.dom_roi_prev.style.height = trim(1, h*this.thumbscale-2, this.th-ty-PanoJS.CONTROL_THUMBNAIL_BORDER) + 'px'; }
Change History (5)
comment:1 Changed 12 years ago by wmoore
comment:2 Changed 12 years ago by jmoore
- Sprint changed from 2012-01-31 (7) to 2012-02-14 (8)
Moved from sprint 2012-01-31 (7)
comment:3 Changed 12 years ago by jburel
- Sprint changed from 2012-02-14 (8) to 2012-02-28 (9)
Moved from sprint 2012-02-14 (8)
comment:4 Changed 12 years ago by Will Moore <will@…>
- Remaining Time set to 0
- Resolution set to fixed
- Status changed from new to closed
(In [11962d2f71b2fe1014ebb0a496fc81df82c17c6d/ome.git] on branch develop) Fix PanoJs? thumb ROI size bug. Closes #7863
comment:5 Changed 12 years ago by Chris Allan <callan@…>
(In [45b4167f4e610af1a41de7c7413295b6c6dd1da0/ome.git] on branch develop) Merge pull request #73 from will-moore/7863_panoJs_roi
For very large images, rounding errors and ROI line width tend to position the ROI too far to the right and down. Top-left of the outside of the line is really the center of the ROI.