zooming

JavaFX - Zoom relative to mouse position

Deadly 提交于 2019-12-06 10:37:06
I can't get working zoom relative to mouse position in JavaFX. I've read and tried rewrite this and this , but it's not working. Can't scroll viewport using scrollPane.setViewportBounds() . I must use scrollPane.setHvalue() and scrollPane.setVvalue() , but can't get right recalculation to keep the same pixels under the mouse cursor. Current code keeps scrollbars positions: ZoomHandler.java import javafx.event.EventHandler; import javafx.scene.control.ScrollPane; import javafx.scene.input.ScrollEvent; import javafx.scene.layout.Pane; public class ZoomHandler implements EventHandler<ScrollEvent>

Bootstrap navbar covers content on zoom

此生再无相见时 提交于 2019-12-06 08:50:55
I am building a website with a navbar-fixed-top class for the navbar.It works fine on everything except when I zoom in. When I zoom in on a mobile device; the navbar starts wrapping and goes to next line after collapsing. However, I do not want the navbar to be affected when zooming in but at the same time keeping the responsiveness for different devices. Is this possible or is there a work around ? <nav class="navbar navbar-default navbar-static-top lato-reg" id="navMenu"> <div class="container"> <div class="navbar-header page-scroll"> <button type="button" class="navbar-toggle" data-toggle=

Doubletap and slide/drag finger to zoom in/out

百般思念 提交于 2019-12-06 07:08:10
问题 If anyone came across the google maps app for iOS there is a great feature to zoom in/out with one finger: Doubletap on the uiscrollview and then immediately slide finger up or down to zoom in/out. Does anyone know how this is achieved? Did google post any snippet of that? 回答1: I added this functionality to my UIScrollView category. The actual tap recognition is easy, calculating the "correct" (whatever feels "correct") zoomScale is the problem… If you think the category isn't handling this

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

How to zoom to the center with a scrollview?

廉价感情. 提交于 2019-12-05 09:03:53
问题 We had previously implemented tapping to zoom and now we've decided to use icons instead that will zoom in on the center of whats currently being displayed, and we'd like to reuse the code we had for our tap to zoom since we want the same effect, but now we don't know what to pass as the centerpoint. We're using the (CGRect)zoomRectForScale:(float)scale withCenter:(CGPoint)center method which used to accept a center cgpoint from the gesture recognizer that we used for tap zooming; however,

Zooming on Chrome causes CSS positioning issues

…衆ロ難τιáo~ 提交于 2019-12-05 08:01:54
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? You can use em positioning which will reposition and size based on the font size. So when people do like

How to perform zoom in/out on VideoView in android?

允我心安 提交于 2019-12-05 06:33:18
I am using VideoView & running videos from resources. I want to know, is there any way by which I can perform zoom in/out functionality on running video? OK I had this issue and solved it by removing the VideoView and replaced it with a TextureView . You can then apply a Matrix transformation which includes lots of options including zooming. The method for the Matrix I would use is the postScale() method. You can apply multiple effects pre and post, which you can view in the documentation. Edit Here is a custom VideoView from a running project that we used. You can decalre it in XML Layouts

Android how do I zoom and scroll a bitmap which is created on the fly

拜拜、爱过 提交于 2019-12-04 18:56:44
In my application, i'm using the following code for holding a map which is downloaded from a server. <?xml version="1.0" encoding="utf-8"?> <ScrollView android:id="@+id/scrollView1" android:layout_height="fill_parent" android:layout_width="fill_parent" android:layout_gravity="center" android:layout_weight="1.0"> <ImageView android:id="@+id/mapImageView" android:layout_height="wrap_content" android:layout_centerInParent="true" android:layout_width="wrap_content" android:scaleType="center"/> </ScrollView> currently, i can scroll the image up and down only. I need to have the ability to scroll

Turn off Zooming in UIScrollView

二次信任 提交于 2019-12-04 16:12:31
问题 Does anyone know a way to temporarily turn off zooming when using a UIScrollView? I see that you can disable scrolling using the following: self.scrollView.scrollEnabled = false; but I'm not seeing a similar command for zooming. Any thoughts? 回答1: If you want to disable the user's ability to zoom through gestures then in iOS 5 and above you can disable the pinch gesture. This still allows you to control the scroll view from code... scrollView.pinchGestureRecognizer.enabled = NO; similarly for

Doubletap and slide/drag finger to zoom in/out

。_饼干妹妹 提交于 2019-12-04 15:51:17
If anyone came across the google maps app for iOS there is a great feature to zoom in/out with one finger: Doubletap on the uiscrollview and then immediately slide finger up or down to zoom in/out. Does anyone know how this is achieved? Did google post any snippet of that? I added this functionality to my UIScrollView category . The actual tap recognition is easy, calculating the "correct" (whatever feels "correct") zoomScale is the problem… If you think the category isn't handling this good enough, please don't hesitate to tell me and open a new issue on the github page. This sample uses