diff options
| author | Todd E Brandt <[email protected]> | 2017-02-09 21:27:43 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2017-02-15 23:52:35 +0000 |
| commit | b3fc275d548dd831ce0e7e9bd74be03092fcdf03 (patch) | |
| tree | 564860111e5c553acfc33bc1e4868b9f9723d266 /scripts/analyze_suspend.py | |
| parent | scripts: analyze_suspend.py: Update to upstream v4.5 (diff) | |
| download | kernel-b3fc275d548dd831ce0e7e9bd74be03092fcdf03.tar.gz kernel-b3fc275d548dd831ce0e7e9bd74be03092fcdf03.zip | |
AnalyzeSuspend: fix drag and zoom bug in javascript
Signed-off-by: Todd Brandt <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'scripts/analyze_suspend.py')
| -rwxr-xr-x | scripts/analyze_suspend.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/analyze_suspend.py b/scripts/analyze_suspend.py index 383df79a13a6..20cdb2bc1dae 100755 --- a/scripts/analyze_suspend.py +++ b/scripts/analyze_suspend.py @@ -3846,6 +3846,7 @@ def addScriptCode(hf, testruns): ' function zoomTimeline() {\n'\ ' var dmesg = document.getElementById("dmesg");\n'\ ' var zoombox = document.getElementById("dmesgzoombox");\n'\ + ' var left = zoombox.scrollLeft;\n'\ ' var val = parseFloat(dmesg.style.width);\n'\ ' var newval = 100;\n'\ ' var sh = window.outerWidth / 2;\n'\ @@ -3853,12 +3854,12 @@ def addScriptCode(hf, testruns): ' newval = val * 1.2;\n'\ ' if(newval > 910034) newval = 910034;\n'\ ' dmesg.style.width = newval+"%";\n'\ - ' zoombox.scrollLeft = ((zoombox.scrollLeft + sh) * newval / val) - sh;\n'\ + ' zoombox.scrollLeft = ((left + sh) * newval / val) - sh;\n'\ ' } else if (this.id == "zoomout") {\n'\ ' newval = val / 1.2;\n'\ ' if(newval < 100) newval = 100;\n'\ ' dmesg.style.width = newval+"%";\n'\ - ' zoombox.scrollLeft = ((zoombox.scrollLeft + sh) * newval / val) - sh;\n'\ + ' zoombox.scrollLeft = ((left + sh) * newval / val) - sh;\n'\ ' } else {\n'\ ' zoombox.scrollLeft = 0;\n'\ ' dmesg.style.width = "100%";\n'\ @@ -4068,7 +4069,7 @@ def addScriptCode(hf, testruns): ' window.addEventListener("load", function () {\n'\ ' var dmesg = document.getElementById("dmesg");\n'\ ' dmesg.style.width = "100%"\n'\ - ' document.onmousedown = onMouseDown;\n'\ + ' dmesg.onmousedown = onMouseDown;\n'\ ' document.onmouseup = onMouseUp;\n'\ ' document.onkeypress = onKeyPress;\n'\ ' document.getElementById("zoomin").onclick = zoomTimeline;\n'\ |
