summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSidharth Singh2013-08-08 09:51:56 (EDT)
committer Stephan Born2013-09-23 04:59:12 (EDT)
commit462b929dd4554b51bb97a1c5eccef3ba2e199756 (patch)
tree4eeea354db1ef7f9b41bff9eba1b61bfea02ecdb
parentfa228d923e167b51810fd5c0069fd736315d2d8c (diff)
downloadorg.eclipse.stardust.ui.web-462b929dd4554b51bb97a1c5eccef3ba2e199756.zip
org.eclipse.stardust.ui.web-462b929dd4554b51bb97a1c5eccef3ba2e199756.tar.gz
org.eclipse.stardust.ui.web-462b929dd4554b51bb97a1c5eccef3ba2e199756.tar.bz2
Jira-ID: CRNT-29971
Used the tiff div location to calcualte the height of viewer. git-svn-id: https://svn.csa.sungard.com/repos/ipp2/product/trunk/stardust/ui.web@66576 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b Signed-off-by: Sidharth Singh <sidharth.singh@sungard.com>
-rw-r--r--views-common/src/main/resources/META-INF/xhtml/scripts/tiffViewerEventScript.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/views-common/src/main/resources/META-INF/xhtml/scripts/tiffViewerEventScript.js b/views-common/src/main/resources/META-INF/xhtml/scripts/tiffViewerEventScript.js
index e138f7c..3a19347 100644
--- a/views-common/src/main/resources/META-INF/xhtml/scripts/tiffViewerEventScript.js
+++ b/views-common/src/main/resources/META-INF/xhtml/scripts/tiffViewerEventScript.js
@@ -24,23 +24,27 @@ function restoreTiffIframe(iframeId, anchorId) {
}
var windowWidth = document.body.clientWidth;
var windowHeight = document.body.clientHeight;
+
docWidth = parseInt((document.body.clientWidth - leftValue)) - 30;
- docHeight = parseInt(docWidth * 1.2);
+ docHeight = parseInt(docWidth * 1.2) + 60;
+ var canvasHeight = docHeight;
+ var canvasWidth = docWidth;
+
+ docHeight -= topValue;
+
if (document.getElementById('tiffViewerIframe')) {
- try {
- document.getElementById('tiffViewerIframe').style.width = docWidth;
+ document.getElementById('tiffViewerIframe').style.width = canvasWidth;
+'px';
document.getElementById('tiffViewerIframe').style.height = docHeight;
+'px';
+
window.parent.EventHub.events.publish('CANVAS_RESIZED', docWidth,
docHeight);
- } catch (e) {
- }
this.parent.window.BridgeUtils.FrameManager.resizeAndReposition(
iframeId, {
anchorId : anchorId,
- canvasWidth : docWidth,
- canvasHeight : docHeight,
+ canvasWidth : canvasWidth,
+ canvasHeight : canvasHeight,
width : docWidth,
height : docHeight
});