Skip to content

Commit

Permalink
Fix double click to zoom causing a pan
Browse files Browse the repository at this point in the history
  • Loading branch information
siggy committed Mar 1, 2021
1 parent 216440d commit 8fa7dc6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright 2020 Andrew Seigner
Copyright 2021 Andrew Seigner

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
12 changes: 1 addition & 11 deletions README.md
Expand Up @@ -69,28 +69,18 @@ deserve calling out:
- warning on spinner requests can take up to 1 minute
- show "Last refresh" time
- make fonts bigger / easier to read
- fix double click to zoom changing center / viewport limits
- fix thumbnail click to move not tracking the click point exactly
- fix http://localhost:8888/?repo=github.com/kubernetes/kubernetes&cluster=true
- deterministic repo location, with cli flag
- use bin/goda
- don't default to master.info
- faster, replace Download
- golang.org/x/tools/go/vcs or
- https://github.com/gojp/goreportcard/blob/master/download/download.go
- OR: use existing proxy, then fall back to vcs/download.go
- deterministic repo location, with cli flag?
- don't shell out
- landing page
- prod
- default to this repo
- remove or repurpose localhost URLs in readme
- monitoring, cache hits/misses
- graphs by repo revision
- fix new svg loading on firefox
- prevent normal dragging on mobile
- fix thumbnail resize/refresh jitter
- fix irc logo thumbnail border aspect ratio
- show progress during repo compile
- generic svg and dot support, paste and url
- consider capturing all mouse scrolling over every element
- on drag mouseup, don't open godoc link
7 changes: 6 additions & 1 deletion public/js/gographs.js
Expand Up @@ -238,7 +238,12 @@ function between(val, a, b) {
}
}

function beforePan(_, newPan){
function beforePan(oldPan, newPan){
if (oldPan.x == newPan.x && oldPan.y == newPan.y) {
// zoom, not a pan
return newPan;
}

const sizes = this.getSizes();
const viewportRect = DOM.viewport.getBoundingClientRect();

Expand Down

0 comments on commit 8fa7dc6

Please sign in to comment.