Single finger scrolling panes - how? - webkit

See here:
http://dev.sencha.com/deploy/touch/examples/kitchensink/ (click/tap on "Touch Events")
The pane that explains the touch events available, you can drag w/ one finger on an iPad or iPhone, and even on the desktop you can use the mouse to drag/scroll as well. How does this work?! I need to be able to do this without Sensa Touch (we're using jQuery Mobile).

I used iScroll4 and it worked fairly well.
http://cubiq.org/iscroll-4
If you are using jQuery Mobile, you may want to try out their experimental "Scroll View." I haven't ran across a reason to try it yet but it does look promising.
http://jquerymobile.com/test/experiments/scrollview/

Related

JetBrains IDEs scrolling on touchscreen

I'm having a problem scrolling in all the JetBrains IDEs (PyCharm, PhpStorm) using touch screen. I have a Dell XPS 15 with a touchscreen.
When I try to scroll it just selects code. I have tried in regular Notepad and Notepad++ and there works as expected.
Has anyone else experienced it? Is there any solution to this? It would be really great to scroll through the code using touchscreen.
I have found temporary solution by installing plugin Code glance (https://plugins.jetbrains.com/plugin/7275). The plugin provides a sidebar with code map, which is similar to the one from Sublime. In the sidebar it is possible to navigate through code. It is not ideal but it's better than nothing.
Yes, I was having the same problem. And luckily I got a gesture to scroll using two fingers:
Scroll up: Tap and hold using one finger and swipe away[from close to distant of the first finger] using another finger. Swiping away from each other also works.
Scroll Down: Tap and hold using one finger and swipe in[from distant to close of the first finger] using another finger. Swiping close to each other also works.

konva.js behavior when the mouse button is pressed

I ask if konva.js may behave like other graphics libraries as Raphael.js or Paper.js when the mouse is pressed and then leaves the canvas or browser window, this video illustrates the difference in behavior by default.
https://www.youtube.com/watch?v=DeBNJiN_Vdo
Is there a trick to konva.js work the same way?
(google translator)
It is fixed in develop version.
You can get the last build here: https://raw.githubusercontent.com/konvajs/konva/master/konva.js

Prev and next buttons for pickers in Sencha Touch 2

I'm building an App for Android, iOS and Blackberry with Sencha Touch 2.0.1.
I have a Form-Panel with about 10 selectfields and some sextfields. If i ran the app on Android 2.3 or higher, the selectfields are shown as pickers. So far so good.
When the user starts filling out the form starting with textfields, he can go through the form using the next-button on the virtual keyboard. The problem is, that the selectfields are ignored by the next-button. The user has to tap on the selectfields.
I can't figure out how to get prev- and next-Buttons for the picker-elements. So that I can go through the form only with the next-Button instead of pressing "done" and tapping on the next Selectfield. It would be far more comfortable for the user.
So support of the sencha-forum isn't really helpful, see below:
http://www.sencha.com/forum/showthread.php?219636-Native-select-field-for-Android
http://www.sencha.com/forum/showthread.php?205581-Can-I-use-iOS-native-picker-instead-of-ST2-picker
According to this, there are prev- and next buttons available for a picker:
http://www.sencha.com/forum/showthread.php?205159-Ext.picker.Date-with-no-prev-and-next-buttons&p=803794
But I can't find them:-(
I think, there are two solutions to the problem:
Accessing the native Picker as proposed in the first link above. The question is how?
Implementing an own Picker-Element with an Prev- and Next-Button. This seems to be a huge efford for such a basic task.
I can't really believe, that this is such a big deal in a big framework like Sencha Touch.
Anyone facing the same problem and has a working solution?
My only idea for you would to put your picker on the page as normal, then add two buttons on the page - a Prev and Next buttons using Sencha. Then add onTop handlers for those buttons, that use the picker's .setActiveItem() method to set the picker to the next or previous item. Hopefully that will get you on your way.
http://docs.sencha.com/touch/2-0/#!/api/Ext.picker.Picker-method-setActiveItem

Workaround for history animation in Safari for OS X Lion?

In Safari for OS X Lion, when you use the swipe gesture to navigate forward or backward in history, the window animates as though you were moving through physical pages. The problem with this behavior is that many apps already listen for changes in the history state, and respond appropriately -- either when the hash is changed, or when HTML5 pushState is used.
A perfect example is GitHub, when navigating in and out of folders -- https://github.com/johndyer/mediaelement, for example. If you click on a folder, then swipe to the previous page, the end state "snapshot" is shown, and then animated to again from the beginning state, which not only is confusing, but nullifies the informational value of the animation.
Today is my first day using Lion, but I'm curious if any other web devs have encountered this issue, and whether you've found a workaround?
Sadly it seems there's no documentation about this in the Safari Developer Library.
But there is an (ugly) workaround to disable them on your client machine at least.
In the Trackpad settings, if you set Swipe between pages to Swipe with two or three fingers you can use two fingers to do fancy animations, and three fingers if you don't
like them. But it feels really weird, especially because the three finger swipe is in the
wrong direction.
Maybe use Modernizr to sniff out Safari and rely on Safari's native animation instead of your code's animation? I know this doesn't help with consistency, but lets face it... this is a browser we are talking about!
I would suggest that you go into settings and navigate to gestures. Here, you will see a little dropdown bar that contains the options. Select either of the other two options to fix this. Hope I could help!

How to create a Controller to simulate the Springboard feature of the iPhone within your own application

I am trying to design a feature in my application for the iPhone that simulates the Springboard feature (Main menu of the iPhone that allows you to view more apps), or the way Weather application works that allows you to flip between views.
Does anyone have any samples of this how I would go about doing this. It's seems very trivial but I am wondering if I am missing something that is already available either as an Apple example or someone who did a tutorial on this.
The image below show how the user would use it.
alt text http://www.agilitesoftware.com/SpringboardExample.png
As they slide their finger to the right (or left) the other image would begin to show up. And it would animate smoothly. The faster you swiped your finger the faster it would move to the next view.
Update: The other feature is that it should mimic the same feel when you slide your hand across the display that is snaps to the current view into place. It should not keep sliding across if there is more than 1 view to the direction you swiping your finger.
I've seen other applications use this so that is why I am asking.
This is accomplished using the UIScrollView with the pagingEnabled property set to true. Just add each of your views, adjust the contentSize, and it will automatically "page" to the width of the screen across the content.
There is a sample app (with code) with exactly this functionality on the iPhone developer site on Apple.com (I believe it's called "PageControl".) - I'd suggest checking it out.
d.
I'm writing an app that uses a similar UI. As NilObject recommended, we're using a UIScrollView with pagingEnabled=YES.
You may also be interested in this example code involving just two child views. I'm trying it out now; it's an interesting technique but I've had to write some additional special-casing code for some odd situations that resulted.
There's also another question on this site that asks about creating a grid of icons like the home screen.
I would check out Joe Hewitt's code from the Three20 project for this. It provides a nice interface and further refinement of the UIScrollView implemented as TTScrollView and TTScrollViewDelegate, TTScrollViewDataSource.