Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #7863 (closed)

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

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

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.

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

Fix PanoJs? thumb ROI size bug. Closes #7863

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.67073 sec.)

We're Hiring!