Loading ...
Sorry, an error occurred while loading the content.
 

Re: [ydn-javascript] scrollIncrement doesn't seem to work for a verical carousel

Expand Messages
  • Gopal Venkatesan (गोपाल वे
    Hi Ave: My responses inline. ... The scrollIncrement property configures the number of items to scroll when the arrow key is pressed, or when the
    Message 1 of 2 , Dec 2, 2008
      Hi Ave:

      My responses inline.

      On Tue, Dec 2, 2008 at 3:29 AM, ave.wrigley <ave.wrigley@...> wrote:
      > I am using a vertical carousel, and setting scrollIncrement to 1:
      >
      > carouselObj = new YAHOO.widget.Carousel(
      > "videoCarousel",
      > {
      > numVisible: nVisible,
      > isVertical: true,
      > scrollIncrement: 1,
      > animation: { speed: 0.5 }
      > }
      > );
      >
      > but the carousel seems to default to scroll one page instead of one
      > item.

      The "scrollIncrement" property configures the number of items to
      scroll when the arrow key is pressed, or when the scrollBackward(),
      scrollForward() methods are called. The navigation buttons do not
      call scrollBackward() or scrollForward(), instead invokes the
      scrollPageBackward() and scrollPageForward() methods which scrolls a
      page backward or forward. A page is defined by the value of the
      "numVisible" property.

      So, my suggestion is that you can replace the navigation buttons with
      yours to scroll only one item (by invoking
      scrollBackward/scrollForward methods), or you can add buttons to do as
      desired.

      > I am also having trouble with the width of the carousel; I am
      > setting the width of the carousel and of the indivual <li>s using CSS:
      >
      > .yui-carousel-element li {
      > height: 64px;
      > width: 200px;
      > }
      <snip>
      > but the width of the carousel seems to get set dynamically to 99px
      > (from firebug inspect element ...):

      The Carousel automatically calculates the width of the container based
      on the width of a single item. Also, if the width of a single item is
      less that it cannot accommodate the width of the navigation buttons,
      it assigns the minimum width to accommodate the navigation buttons.

      Whether the Carousel should use the width set in the CSS (always
      assuming the developer is right), or automatically calculate the width
      may require some thoughts. Please add your valuable inputs to the bug
      that's already opened for the same.

      http://sourceforge.net/tracker/index.php?func=detail&aid=2354835&group_id=165715&atid=836476

      --
      Gopal Venkatesan
      http://g13n.in/

      Note: if you see question marks (?????) after my name in the From
      header, then your mail tool is not Unicode enabled!
      You should see my name (Gopal Venkatesan) in Hindi (गोपाल वेंकटेसन)
    Your message has been successfully submitted and would be delivered to recipients shortly.