zooming

D3 mousewheel zoom direction

最后都变了- 提交于 2020-03-21 07:04:30
问题 I'm trying to create some custom zoom functionality in d3.js. Currently the zoom is triggered on a single click and zooms in to focus only on the area that was clicked on. Currently my code has a function zoom(d) that does exactly what it needs to. There is also a var zoomTransition which resides inside zoom() and is responsible for much of the functionality. I'm unfortunately unable to share much of my code. The zoom needs to also occur on a mouse scroll. The difficulty I'm having is that

Zooming functionality in OpenCV imshow in Windows

眉间皱痕 提交于 2020-01-22 02:52:06
问题 In Ubuntu, OpenCV's imshow function has a window where different options such as zoom in, zoom out, pan window, etc, are available, like this: However, in Windows, these features are absent. I have a particular case where I need to deploy my OpenCV code on Windows, where the user needs to zoom into parts of the image. Is there any way to access/add these functionalities in Windows also? 回答1: see https://gist.github.com/BartG95/1ce8ba1e9c25ec3698d1 appears to be a longer procedure though, so

Zooming on Chrome causes CSS positioning issues

一曲冷凌霜 提交于 2020-01-13 09:34:11
问题 When I zoom in and out on my webpage in Google Chrome, items that are precisely positioned in relation to one another will change position. This causes many problems: For example, at specific zoom levels a div will overlap its containing div just enough to hide a border. Similarly, sometimes a 100% marker will not precisely line up with the 100% point. Is there any way I can ensure that the positioning of the items in relation to each other will not change when the page is zoomed in or out?

Resizing drawlines on a paint event

坚强是说给别人听的谎言 提交于 2020-01-07 09:22:25
问题 I've seen few questions about this problem, I tried every solution but none of them worked for my case. My code is working; this image shows what happens when I click on Draw button. I need to zoom on that drawing.Is it possible to code something like autocad feature "zoom/extent"? Pen myPen = new Pen(Color.Black); int centerpointx, centerpointy; private void pictureBoxDraw_Paint(object sender, PaintEventArgs e) { centerpointx = pictureBoxDraw.Size.Width/2; centerpointy = pictureBoxDraw.Size

Resizing drawlines on a paint event

 ̄綄美尐妖づ 提交于 2020-01-07 09:22:19
问题 I've seen few questions about this problem, I tried every solution but none of them worked for my case. My code is working; this image shows what happens when I click on Draw button. I need to zoom on that drawing.Is it possible to code something like autocad feature "zoom/extent"? Pen myPen = new Pen(Color.Black); int centerpointx, centerpointy; private void pictureBoxDraw_Paint(object sender, PaintEventArgs e) { centerpointx = pictureBoxDraw.Size.Width/2; centerpointy = pictureBoxDraw.Size

D3 zoomable sunburst not zooming (with data from R)

偶尔善良 提交于 2020-01-07 04:41:27
问题 I'm trying to adapt some code so I can plot data in a sunburst (using D3) chart with data coming from R as a dataframe. I've got most of it working ok except the zooming part, when i click (almost) nothing happens. On mouseOver I've got a portion of circle with a greater radius than the one for the sunburst to help emphasizing the data I'm hovering. This explains the arcHighlight variable. Also one can notice it is not constructed using my scales a and b . I modifed the original code to use

Slight background zoom on DOM load?

江枫思渺然 提交于 2020-01-06 13:09:20
问题 How to reproduce the effect on this website : https://shop.stripe.com/ I mean waiting for the DOM to fully load before showing anything, and then having the background image zooming out for 1s. Pretty cool. 回答1: It's done using different transition and transforms together. Demo: http://jsfiddle.net/lotusgodkk/eHAuh/2/ Key is to add/remove classes in document.ready HTML: <div id="DIV_1" class="scaled"></div> JS: $(document).ready(function () { $('#DIV_1').attr('class', 'animatable');

Slight background zoom on DOM load?

可紊 提交于 2020-01-06 13:08:39
问题 How to reproduce the effect on this website : https://shop.stripe.com/ I mean waiting for the DOM to fully load before showing anything, and then having the background image zooming out for 1s. Pretty cool. 回答1: It's done using different transition and transforms together. Demo: http://jsfiddle.net/lotusgodkk/eHAuh/2/ Key is to add/remove classes in document.ready HTML: <div id="DIV_1" class="scaled"></div> JS: $(document).ready(function () { $('#DIV_1').attr('class', 'animatable');

Zoom Images in Paged UIScrollView

北战南征 提交于 2020-01-06 03:28:29
问题 I am creating a paging UIScrollView following this tutorial. This is the Swift code which allow paging of images with UIScrollView . However, it has a limitation. I am unable to zoom the images. class PagedScrollViewController: UIViewController, UIScrollViewDelegate { @IBOutlet var scrollView: UIScrollView! @IBOutlet var pageControl: UIPageControl! var pageImages: [UIImage] = [] var pageViews: [UIImageView?] = [] override func viewDidLoad() { super.viewDidLoad() // 1 pageImages = [UIImage

Joints break when zooming

こ雲淡風輕ζ 提交于 2020-01-02 16:20:44
问题 I've been rehearsing Sprite Kit lately and I've come across a very strange problem. When zooming (changing the scale of) the parent node, bodies that are joined together by SKPhysicsJointPin separate from each other gradually and then joints break. Let me show you the images. This is for the normal state: Here's when zoomed in: And here's when zoomed out: If you ask how I join bodies: I join the brown sticks to the blue nodes on the center of the blue nodes. Any ideas what my problem is? EDIT