panning

UIScrollView with touchesMoved not called

那年仲夏 提交于 2019-11-28 09:50:32
问题 I've a UIScrollView that contains an UIImageView. The UIScrollView lets zooming and panning through the UIImageView. The problem is that I would like know the finger movement every time, and I'm trying to catch the event with touchesMoved method. But it's not working, despite touchesBegan and touchesEnded that are called correctly. In fact, touchesMoved is called if the finger movement is really small, and the UIScrollView doesn't started panning. At the moment that UIScrollView starts

Scale at pivot point in an already scaled node

人走茶凉 提交于 2019-11-28 06:34:24
I'm trying to create an application with a zoomable/pannable canvas. Features : zoom in/out with mouse wheel at pivot points drag nodes around on the canvas with left mouse button drag the entire canvas with right mouse button The zooming at the pivot point works as long as you start the zooming at scale 1. Position the mouse over a grid point and scroll the mouse wheel. The pivot point will remain where you started zooming. Problem : When you zoom in, then move the mouse to another point and zoom again, then the pivot point is shifted and zooming isn't happening anymore at the initial mouse

HTML5 Panning based on Mouse Movement

岁酱吖の 提交于 2019-11-28 04:27:23
问题 I'm trying to implement functionality to "pan" inside a canvas in HTML5 and I am unsure about the best way to go about accomplishing it. Currently - I am trying to detect where the mouse is on the canvas, and if it is within 10% of an edge, it will move in that direction, as shown: Current Edge Detection: canvas.onmousemove = function(e) { var x = e.offsetX; var y = e.offsetY; var cx = canvas.width; var cy = canvas.height; if(x <= 0.1*cx && y <= 0.1*cy) { alert("Upper Left"); //Move "viewport

JFreeChart: data disappears after zooming and panning

冷暖自知 提交于 2019-11-28 02:11:31
I have a JFreeChart time series chart, which displays a TimePeriodValuesCollection. The dataset contains two intervals. The data is appearing correctly and I am able to pan (with Ctrl-drag) the view. The problem is that if I zoom in, and I pan the view to the right in the zoomed view, the second interval suddenly disappears after the first interval is no longer visible. Everything is OK, if there is only one interval, or if I don't zoom in. Any thoughts? SSCCE: public class DisappearingTest { public static final SimpleDateFormat oracleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); public

Zoom and pan in animated HTML5 canvas

霸气de小男生 提交于 2019-11-27 05:22:09
I have a map. I want a user to be able to zoom and pan the map. Imagine Google Maps, but instead of being infinitely pannable, the map is a square (it doesn't wrap around again if you go past the edge of it). I have implemented zoom and pan using scale() and translate() . These work well. I am stuck on the final part - when a user zooms, I want to center the zoom around that point. It is hard to explain in words, so just imagine what happens when you mousewheel in Google Maps - that is what I want. I have looked at every answer on SO with any of these terms in the title. Most are variations on

Zoom and pan in animated HTML5 canvas

喜夏-厌秋 提交于 2019-11-26 12:48:01
问题 I have a map. I want a user to be able to zoom and pan the map. Imagine Google Maps, but instead of being infinitely pannable, the map is a square (it doesn\'t wrap around again if you go past the edge of it). I have implemented zoom and pan using scale() and translate() . These work well. I am stuck on the final part - when a user zooms, I want to center the zoom around that point. It is hard to explain in words, so just imagine what happens when you mousewheel in Google Maps - that is what