From 3e2836b2cb8983985eed526f13945bd9052a8bcd Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Fri, 10 Jul 2015 23:51:33 -0400 Subject: [PATCH] remove debug message in getscroll try using clientWidth/Height instead of innerWidth/Height in getscroll --- pd/nw/pd_canvas.html | 2 +- pd/nw/pdgui.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pd/nw/pd_canvas.html b/pd/nw/pd_canvas.html index fa8b401dc..e9ff81e74 100644 --- a/pd/nw/pd_canvas.html +++ b/pd/nw/pd_canvas.html @@ -10,7 +10,7 @@ <input style="display:none;" id="openpanel_dialog" type="file" /> <input style="display:none;" id="savepanel_dialog" type="file" nwsaveas nwworkingdir /> - <svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="patchsvg" height="1000" width="1000" overflow="visible" class="noselect"> + <svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="patchsvg" overflow="visible" class="noselect"> </svg> <script> 'use strict'; diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index b660e3928..f3f84a583 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -3576,11 +3576,10 @@ function do_getscroll(cid) { var width = bbox.x > 0 ? bbox.x + bbox.width : bbox.width, height = bbox.y > 0 ? bbox.y + bbox.height : bbox.height; if (width === 0) { -gui_post("our width is 0"); - width = patchwin[cid].window.innerWidth; + width = patchwin[cid].window.clientWidth; } if (height === 0) { - height = patchwin[cid].window.innerHeight; + height = patchwin[cid].window.clientHeight; } configure_item(svg, { viewBox: [bbox.x > 0 ? 0 : bbox.x, -- GitLab