Limit scrolling direction in Feathers ScrollContainer - actionscript-3

I have a Feathers ScrollContainer with a starling display object added under it.
When a child object is larger than the ScrollContainer, it will automatically allow scrolling.
I want to restrict the scrolling direction to be vertical only, and not horizontal.
Any tips?
Thanks,
G

Setting the scroll policy to off on the horizontal and auto on the vertical should do what you want:
YourScrollContainerNameHere.horizontalScrollPolicy = Scroller.SCROLL_POLICY_OFF;
YourScrollContainerNameHere.verticalScrollPolicy = Scroller.SCROLL_POLICY_AUTO;
See the Scroll Policies section # http://feathersui.com/help/scroll-container.html

Related

How do I give a fixed height (dynamic) list overscroll bounce even when its items have not (yet) exceeded the list container height?

When using a fixed-height ul with overflow scroll, the list will not have an overscroll bounce effect until its items exceed the height of the list. However, on mobile, I'd like the list container to have an overscroll bounce effect even when its items have not overflowed the container. Consider iMessage for instance, even when only a single message exists in a conversation, one can still pull the list to scroll (bounce), albeit to snap back into place. This gives the user an indication that the view is a dynamic list that will be scrollable. What is a way to achieve this effect? And what is the proper term for the effect of a list having a sort of padding that a user can scroll to?
Perhaps you mean lazy loading.

Is there a way to allow a Slate chart to scroll along the x axis?

I have a graph with an x-axis that has 53 categories, and the axis labels aren't showing up because they're too condensed.
Is there a way to make the chart scroll so all my categories will fit?
If your chart axis is linear or time-series rather than categorical, you can turn on pan and zoom via the checkbox under the "Misc" menu. If your axis is categorical, make a container with scrolling enabled and put the chart inside the container. Then you can make the chart as wide as you'd like, and rely on the container's scrolling to allow you to see all the categories.
To get a bit fancier, you can use conditional CSS to dynamically resize the entire Chart within the scrolling container; this is useful if the number of categories is dynamic. Search your Foundry instance for scrollable bar chart to find a reference example.

HTML5 dragging element left does not show horizontal scrollbar

I have a div that holds multiple draggable elements.
When I drag an elements to the right, the horizontal scroll bar appears and I can scroll the div. This is what it looks like:
However, when I drag the elements left, the horizontal scroll bar doesn't show. Example:
I have the overflow property set to auto.
I understand that this is the deafult behavior of the browser, and that not showing the scroll bar is "correct", however if anyone has any suggestions how to make the overflow also work when moving elements left, it would be greatly appreciated! TIA!
No. When you drag an element to the right you are increasing the page width and triggering a horizontal scrollbar. When you drag an element to the left, you are simply moving it off the page.
You might try dynamically increasing the page width based on how far the element has been dragged outside the left edge of the page.
The browser is working as designed.

overflow scroll, start at the bottom, scroll up

I have a simple chat section in my app similar to texting/iMessage. How can I have overflow hidden, but starting at the bottom and scroll up? Is there anyway to do this without JS?
This task requires you to initially set the scrollTop position and it's necessary to use JS to do the job. I don't think using CSS alone would fit your need.
See this:
set scrollTop and scrollLeft without javascript

Scrolling Spark List without Scroller bar

How to scroll Spark list with a disabled scroller bar?
I created two buttons to scroll up and down, but it is unclear what methods can be used to scroll the list.
You shouldn't try to disable the scroll bar. You should create a custom skin for the scroll bar that uses your custom buttons and places them appropriately based on the design you want.
More info on skinning a Scroller
All that said, you can scroll a list by setting the horizontalScrollPosition or verticalScrollPosition on it's dataGroup. Conceptually something like this:
myList.dataGroup.horizontalScrollPosition = newPosition;