panning

Panning Image Using Javascript in ASP.Net Page Overflows Div

跟風遠走 提交于 2019-12-08 13:13:03
问题 I have an ASP.Net page that contains a <div> with an <img> tag within. The image is large so the <div> is set with a size of 500x500 pixels with overflow set to scroll. I'm attempting to add image panning using a click and drag on the image. However, every time I begin dragging the image escapes the boundary of the element and consumes the entire page. Here is example code that illustrates the problem: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="

Avoid custom overlay click event when map is panning (google maps API)

空扰寡人 提交于 2019-12-08 12:41:58
问题 Related to this question: 'Make custom overlay clickable (Google Maps API 3)' and related also to my comment in the same question (posted here to give it more visibility and because I think is other problem). I have added a click listener to my overlay polygon but now I have the problem that when user wants to pan the map and clicks on an overlay to do that, when the mouse button is released the click event is triggered. Obviously I don't want to execute the onclick action when I just want to

C4: Add panning to an object other than “self”

人盡茶涼 提交于 2019-12-07 15:30:49
问题 I watched the C4 tutorial on adding a pan gesture to an object and animating it to return to its original position when the panning is finished. I'm trying to add this to three individual objects. I have it working with one object so far to move it and reset it to a CGPoint, but for it to work, I have to add the pan gesture to "self", not the object. For reference, I'm pretty much using the code from here: http://www.c4ios.com/tutorials/interactionPanning If I add the gesture to the object

C4: Add panning to an object other than “self”

你离开我真会死。 提交于 2019-12-06 03:36:30
I watched the C4 tutorial on adding a pan gesture to an object and animating it to return to its original position when the panning is finished. I'm trying to add this to three individual objects. I have it working with one object so far to move it and reset it to a CGPoint, but for it to work, I have to add the pan gesture to "self", not the object. For reference, I'm pretty much using the code from here: http://www.c4ios.com/tutorials/interactionPanning If I add the gesture to the object itself, sure, it pans around, but then it just leaves itself at the last touch location. However, I'm

D3 - How to get correct scale and translate origin after manual zoom and pan to country path

*爱你&永不变心* 提交于 2019-12-06 02:44:31
问题 I've got a topology map with pan and zoom functionality. Clicking on the country, I'm zoom/panning into the country, using this: if (this.active === d) return var g = this.vis.select('g') g.selectAll(".active").classed("active", false) d3.select(path).classed('active', active = d) var b = this.path.bounds(d); g.transition().duration(750).attr("transform","translate(" + this.proj.translate() + ")" + "scale(" + .95 / Math.max((b[1][0] - b[0][0]) / this.options.width, (b[1][1] - b[0][1]) / this

JavaFX setFitHeight()/setFitWidth() for an image used within a scrollPane disables panning

北城余情 提交于 2019-12-04 04:44:17
问题 So I am creating a map in JavaFX and I would like to have the whole map visible at times. However, the issue is that after I set the imageView to fit the screen size then adding it to the scrollPane my zoom function works fine, but once I zoom in I am not allowed to pan around the image. Below is the code that I have written. package gameaspects; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import javafx.application.Application; import javafx.scene.Scene; import javafx

JavaFX setFitHeight()/setFitWidth() for an image used within a scrollPane disables panning

天大地大妈咪最大 提交于 2019-12-02 00:56:55
So I am creating a map in JavaFX and I would like to have the whole map visible at times. However, the issue is that after I set the imageView to fit the screen size then adding it to the scrollPane my zoom function works fine, but once I zoom in I am not allowed to pan around the image. Below is the code that I have written. package gameaspects; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.ScrollPane; import javafx.scene.control.ScrollPane.ScrollBarPolicy; import javafx.scene

Charting Library for Windows Phone 7 with Zooming & Panning?

半世苍凉 提交于 2019-12-01 23:56:11
问题 I'm looking for a Silverlight charting library to use in my Windows Phone 7 project to visualize 50-100 data points. I'd like the series to be zoomable and pannable and be able to attach to these events. I've so far looked at the Silverlight Toolkit for WP7, however it seems it does not support zooming or panning at all. Is there any component out there I could use for this? Seems like a pretty basic requirement for a charting library on the phone, yet I've failed to find any. 回答1: The

Charting Library for Windows Phone 7 with Zooming & Panning?

杀马特。学长 韩版系。学妹 提交于 2019-12-01 23:20:53
I'm looking for a Silverlight charting library to use in my Windows Phone 7 project to visualize 50-100 data points. I'd like the series to be zoomable and pannable and be able to attach to these events. I've so far looked at the Silverlight Toolkit for WP7 , however it seems it does not support zooming or panning at all. Is there any component out there I could use for this? Seems like a pretty basic requirement for a charting library on the phone, yet I've failed to find any. The charting controls from VisiBlox support WP7 are free and come highly recommended. Update: With surprising

How to implement camera pan like in 3dsMax?

落花浮王杯 提交于 2019-12-01 03:29:08
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, y): self.last_mouse_pos = vec2(x, y) self.mouse_down_pos = vec2(x, y) def glut_motion(self, x, y): pos