> One problem I did find is that there is no way to resize panels. I can
> click the open/close toggler and it works. And I can click and hold my
> finger on a resizer and the css changes to show it is selected. But
> when I slide my finger, the whole UI pans.
One option is to add control buttons for resizing. For example, add
left (<<) and right (>>) controls inside the resizer (using toggler-
content) that would resizer bigger/smaller, something like...
http://layout.jquery-dev.net/demos/custom_togglers.html
However given the limited resolution of mobile devices, it is unlikely
that much resizing would be necessary, presuming that you chose a good
size to start with. Toggling of panes would be more common, and this
is easily facilitated by just making the togglers bigger.
> And I will take from this that you have no plans to
> make a mobile-friendly version of layout at this time.
At the moment I don't know what that means!?
Regarding the dragging of resizers, it is *possible* that using
different event-binding, combined with stopPropagation(), that they
might be made to work better. This could be easily done with a little
custom code. It's simple to add new bindings to the elements, and/or
to use the ondrag_start & ondrag_end callbacks.
But for a tiny screen, the best idea is probably a *popup-control* -
like a context menu. When the user clicks/touches the resizer-bar, a
widget/popup appears with "Close", "Bigger" and "Smaller" options. The
bigger/smaller could be a slider-widget. This could be a touch-
friendly interface for Layout functionality. Again, this is easily
done using custom events and controlling the layout programically.
I'm happy to help anyone who wishes to add extra interfaces for their
mobile app, but othewise I won't take the time to design new UI
controls at this time. Layout 1.3 has a plug-in interface, so it would
be easy for me to integrate and automate such a feature if someone
creates it ;)
If you want to experiment, I suggest testing specialized touch-events.
For example:
myLayout.resizers.west
.bind("touchesBegan", initResize)
.bind("touchesMoved", doResize)
.bind("touchesEnded", stopResize)
;
All I can suggest for now.
/Kevin
On Oct 4, 2:04 am, Tauren Mills <tau...@tauren.com> wrote:
> Kevin,
> >> Anyway, just curious if anyone has ideas. Or should I plan to build a
> >> non-layout interface for mobile?
> > This is a difficult question to answer...
> > If using the standard (low) resolution of these devices, then a layout
> > is impractical. A normal mobile UI would use multiple 'screens' to
> > handle data - not multiple 'panes'.
> That's exactly what I was thinking. Ideally I would have a completely
> different UI for mobile devices than desktop-like devices. I'm
> including tablets, ipads, etc. in desktop-like.
> > But if your app is designed to run at high resolution (as you
> > indicate), then set *minimum dimensions* for your page (on the layout-
> > container or BODY). Also set the page meta-tags accordingly so that
> > the device knows what resolutions to use. If your layout is on the
> > BODY, set the minimum min-width & min-height on the BODY, then set
> > HTML to overflow:auto !important so it overrides Layout's default.
> > This would cause scrollbars when the screen does not fit the BODY min-
> > sizes.
> Thanks. Actually I already played with setting a min-width and it does
> help. I'll pursue this direction more. Again, this is just as a
> temporary solution so that people can use the app on a mobile device
> until I can develop a real mobile UI. This is by no means a real
> solution.
> One problem I did find is that there is no way to resize panels. I can
> click the open/close toggler and it works. And I can click and hold my
> finger on a resizer and the css changes to show it is selected. But
> when I slide my finger, the whole UI pans. Obviously the scroll of the
> screen overrides the drag of the resizer. I doubt there is any
> workaround to solve this, nor is it terribly important to me. But I
> wanted to mention it.
> > I can see a layout working on a tablet, but a phone would is so small
> > that normal size widgets (tree lists, accordions, toggler buttons,
> > etc) would be unusable for human fingers. So you have to give some
> > thought to how users will interact with the app to determine if a
> > layout is really practical.
> I fully agree. And I will take from this that you have no plans to
> make a mobile-friendly version of layout at this time.
> Thanks again for a great plugin!
> Tauren