zooming

d3.js rewriting zoom example in version4

孤人 提交于 2019-12-02 23:16:52
Drag and Drop Example I am trying to rewrite part of this example above to use in my code, specifically this piece: function centerNode(source) { scale = zoomListener.scale(); x = -source.y0; y = -source.x0; x = x * scale + viewerWidth / 2; y = y * scale + viewerHeight / 2; d3.select('g').transition() .duration(duration) .attr("transform", "translate(" + x + "," + y + ")scale(" + scale + ")"); zoomListener.scale(scale); zoomListener.translate([x, y]); } However I am getting stuck since the v4 package has changed quite a bit. I wrote my zoomListener function to be var zoomListener = d3.zoom()

CSS border disappears when child element has a background color AND browser is zoomed out less than 100%

别来无恙 提交于 2019-12-02 17:38:32
问题 I have an element with a 1px border and a child element that has a background color causing the parent element's border to disappear when I zoom out my browser's zoom to 70-80%. I've noticed it happens in Chrome and IE11 on a PC but not in Chrome on my MacBook Pro. Here's a screenshot of the problem: Below is the sample code: https://codepen.io/richfinelli/full/yvpRxW/ <section class="card__container"> <header class="card__header"> <h1>Title</h1> </header> <div class="card__value">850</div>

D3.js Zoomable Sunburst not Zooming

对着背影说爱祢 提交于 2019-12-02 09:07:27
I have a static 3 level Sunburst diagram - http://colinwhite.net/Sunburst/ My data is being nested with this function http://colinwhite.net/Sunburst/js/treeRemapper.js My approach is based on this example - http://bl.ocks.org/mbostock/4348373 For some reason my zoom and tweening is not working - var width = 960, height = 700, radius = Math.min(width, height) / 2, color = d3.scale.category20c(); var x = d3.scale.linear().range([0, 2 * Math.PI]), y = d3.scale.sqrt().range([0, radius]); var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height) .append("g") .attr(

CSS border disappears when child element has a background color AND browser is zoomed out less than 100%

雨燕双飞 提交于 2019-12-02 08:27:52
I have an element with a 1px border and a child element that has a background color causing the parent element's border to disappear when I zoom out my browser's zoom to 70-80%. I've noticed it happens in Chrome and IE11 on a PC but not in Chrome on my MacBook Pro. Here's a screenshot of the problem: Below is the sample code: https://codepen.io/richfinelli/full/yvpRxW/ <section class="card__container"> <header class="card__header"> <h1>Title</h1> </header> <div class="card__value">850</div> <footer class="card__footer">Lorem ipsum dolor sit amet.</footer> </section> css/scss: .card__container

C++ Zoom into the centre of the screen in 2D coordinates

拈花ヽ惹草 提交于 2019-12-02 08:15:11
I'm having difficulty working out the correct calculations in order to zoom into the centre of the screen in 2D coordinates whilst keeping everything in the correct scale. I have a vector which I use to handle moving around my map editor as follows: scroll = sf::Vector2<float>(-640.0f, -360.0f); It's set at -640.0f, -360.0f to make 0,0 the centre of the screen on initialising (based on my window being 1280x720). My zoom value ranges from 0.1f to 2.0f and it's increased or decreased in 0.05 increments: zoomScale = zoomScale + 0.05; When drawing elements on to the screen they are drawn using the

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

Zoom mapview to a region where pins are dropped

ぐ巨炮叔叔 提交于 2019-12-01 11:56:30
If I have 3 pins in a mapview, how will I zoom to these pins, when the map loads. That is, when the map loads I need to have a zoomed view, but the view should accomodate all pins dropped in the map. Its working, when the map has just one pin. But I cant handle zoom with multiple pins. Help needed I wrote the below code in an App and it is similar to @ElanthiraiyanS Answer -(void)zoomToFitMapAnnotations:(MKMapView*)mapView insideArray:(NSArray*)anAnnotationArray { // NSLog(@"%s", __FUNCTION__); if([mapView.annotations count] == 0) return; CLLocationCoordinate2D topLeftCoord; topLeftCoord

Zoom mapview to a region where pins are dropped

梦想与她 提交于 2019-12-01 10:55:20
问题 If I have 3 pins in a mapview, how will I zoom to these pins, when the map loads. That is, when the map loads I need to have a zoomed view, but the view should accomodate all pins dropped in the map. Its working, when the map has just one pin. But I cant handle zoom with multiple pins. Help needed 回答1: I wrote the below code in an App and it is similar to @ElanthiraiyanS Answer -(void)zoomToFitMapAnnotations:(MKMapView*)mapView insideArray:(NSArray*)anAnnotationArray { // NSLog(@"%s", _

Zooming / stretching a picturebox on current mouse position?

…衆ロ難τιáo~ 提交于 2019-12-01 09:26:05
Q: How can I implement zooming on current mouse position over a picturebox, something like zooming in Google Maps? I am designing a simple GIS / map engine as my thesis work. The application is designed in such a way that the maps are being loaded into tabs of a sligtly modified tabcontrol. Maps are standard JPEG or PNG format digital images and most of them have very high resolutions (2000x2000px and up). They are loaded in pictureboxes that are added as subcontrols of tabpages. I've implemented a simple zooming method as a button click event that only zooms to the center of the image