Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
1da382c8
Commit
1da382c8
authored
Mar 22, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gopprof: fix bug: do not rotate 180 degrees for large scrolls
R=r CC=golang-dev
https://golang.org/cl/4273088
parent
d4b19bdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
src/cmd/prof/gopprof
src/cmd/prof/gopprof
+10
-0
No files found.
src/cmd/prof/gopprof
View file @
1da382c8
...
...
@@ -1896,6 +1896,7 @@ sub SvgJavascript {
// SVGPan
// http://www.cyberz.org/blog/2009/12/08/svgpan-a-javascript-svg-panzoomdrag-library/
// Local modification: if(true || ...) below to force panning, never moving.
// Local modification: add clamping to fix bug in handleMouseWheel.
/**
* SVGPan library 1.2
...
...
@@ -2038,6 +2039,15 @@ function handleMouseWheel(evt) {
var z = 1 + delta; // Zoom factor: 0.9/1.1
// Clamp to reasonable values.
// The 0.1 check is important because
// a very large scroll can turn into a
// negative z, which rotates the image 180 degrees.
if(z < 0.1)
z = 0.1;
if(z > 10.0)
z = 10.0;
var g = svgDoc.getElementById("viewport");
var p = getEventPoint(evt);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment