Roo/bootstrap/DocumentViewer.js
authoredward <edward@roojs.com>
Wed, 17 Feb 2016 07:04:09 +0000 (15:04 +0800)
committeredward <edward@roojs.com>
Wed, 17 Feb 2016 07:04:09 +0000 (15:04 +0800)
Roo/bootstrap/DocumentViewer.js

index fcf86ab..b9f3fad 100644 (file)
@@ -109,6 +109,16 @@ Roo.extend(Roo.bootstrap.DocumentViewer, Roo.bootstrap.Component,  {
         this.setThumbBoxPosition();
     },
     
+    setThumbBoxPosition : function()
+    {
+        var x = Math.ceil((this.bodyEl.getWidth() - this.thumbEl.getWidth()) / 2 );
+        var y = Math.ceil((this.bodyEl.getHeight() - this.thumbEl.getHeight()) / 2);
+        
+        this.thumbEl.setLeft(x);
+        this.thumbEl.setTop(y);
+        
+    },
+    
     onClick : function()
     {