panning

EaselJS - broken panning on zoomed image

故事扮演 提交于 2020-05-15 05:58:22
问题 I'm having trouble fixing panning in this example - it works fine unless you move the zoomed image and then zoom again(offset is set to default value and the view jumps to initial position - http://jsfiddle.net/p2Qzg/). Any ideas on how to fix that? I've been trying to solve that for three days now, without any good results. var canvas= document.getElementById("myCanvas"); canvas.width = window.innerWidth; canvas.height = window.innerHeight; var stage = new createjs.Stage("myCanvas");

EaselJS - broken panning on zoomed image

我的梦境 提交于 2020-05-15 05:58:06
问题 I'm having trouble fixing panning in this example - it works fine unless you move the zoomed image and then zoom again(offset is set to default value and the view jumps to initial position - http://jsfiddle.net/p2Qzg/). Any ideas on how to fix that? I've been trying to solve that for three days now, without any good results. var canvas= document.getElementById("myCanvas"); canvas.width = window.innerWidth; canvas.height = window.innerHeight; var stage = new createjs.Stage("myCanvas");

How to adjust panning while zooming

无人久伴 提交于 2020-05-14 09:13:10
问题 I want to pan while zooming into a Mandelbrot set so that the fractal portion of the function stays within the window. The code outputs a series of png images to later be made into a video. Right now, I have the zooming and panning working but I do not know how to adjust the panning while the function is zooming. import numpy as np import matplotlib.pyplot as plt from os import path #6:36 @2560x1440 500 iter #2:51 @2560x1440 200 iter #0:56 @2560x1440 50 iter #1:35 @2560x1440 100 iter #0:53

How to adjust panning while zooming

南笙酒味 提交于 2020-05-14 09:11:50
问题 I want to pan while zooming into a Mandelbrot set so that the fractal portion of the function stays within the window. The code outputs a series of png images to later be made into a video. Right now, I have the zooming and panning working but I do not know how to adjust the panning while the function is zooming. import numpy as np import matplotlib.pyplot as plt from os import path #6:36 @2560x1440 500 iter #2:51 @2560x1440 200 iter #0:56 @2560x1440 50 iter #1:35 @2560x1440 100 iter #0:53

How to adjust panning while zooming

对着背影说爱祢 提交于 2020-05-14 09:11:31
问题 I want to pan while zooming into a Mandelbrot set so that the fractal portion of the function stays within the window. The code outputs a series of png images to later be made into a video. Right now, I have the zooming and panning working but I do not know how to adjust the panning while the function is zooming. import numpy as np import matplotlib.pyplot as plt from os import path #6:36 @2560x1440 500 iter #2:51 @2560x1440 200 iter #0:56 @2560x1440 50 iter #1:35 @2560x1440 100 iter #0:53

How to implement camera pan like in 3dsMax?

末鹿安然 提交于 2020-01-11 04:51:05
问题 What are the necessary maths to achieve the camera panning effect that's used in 3ds max? In 3ds max the distance between the cursor and the mesh will always remain the same throughout the entire movement (mouse_down+mouse_motion+mouse_up). My naive and failed attempt has been trying to move the camera on the plane XY by using dt (frame time) multiplied by some hardcoded constant and the result is really ugly and uintuitive. The code I've got so far is: def glut_mouse(self, button, state, x,

Scale at pivot point in an already scaled node

孤街醉人 提交于 2020-01-09 09:05:52
问题 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

Scale at pivot point in an already scaled node

不打扰是莪最后的温柔 提交于 2020-01-09 09:05:14
问题 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

A Simple Panning PictureBox (Winforms)

大城市里の小女人 提交于 2019-12-25 05:36:13
问题 I want to implement a panning pictureBox in C# winforms. I have a panel on which the autoScroll property is set to true. Within the panel I have my pictureBox whose sizeMode is set to autoSize. On the pictureBox I am listening to mouse events like so: private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { dragging = true; start = new Point(e.Location.X + pictureBox1.Location.X, e.Location.Y + pictureBox1.Location.Y); } } private void

Leaflet: pan map to new set of coordinates at new zoom-level on user action

孤者浪人 提交于 2019-12-24 18:05:10
问题 I have a web app with a list of GPS-check-ins from field agents. I would like to pan/zoom the current map/view when a check-in item from the list is clicked. I have setup the leaflet map and click event like so: function checkin_clicked(dt, mobile, address, lat, lon) { console.log(dt, mobile, address, lat, lon); var html = '<div style="width: 300px;" class="message"><img class="message-avatar" src="media/profile-pics/{mobile}.jpg" alt=""> <a class="message-author" href="#"> {name} </a> <span