ryrych / rcarousel

yet another jQuery UI carousel
http://ryrych.github.com/rcarousel/
172 stars 48 forks source link

startAtPage issue #46

Open gicosens opened 12 years ago

gicosens commented 12 years ago

When I use the startAtPage option, the correct screen shows in the carousel, but the navigation assumes that I am displaying #screen01.

I have 6 pages (#screen01-06) . If I set startAtPage to be 4, #screen04 will show but if I click on next, it then shows #screen02 instead of #screen05. I also see the bullet marker as on for #screen01.

Has anybody else experienced these issues?

kdreamer commented 9 years ago

I've fixed this bug by changing the pagaIndex and the oldPageIndex to the options.startAtPage

_createDataObject: function() { var $root = $( this.element );

        $root.data("data",
            {
                paths: [],
                pathsLen: 0,
                pages: [],
                lastPage: [],
                oldPageIndex: this.options.startAtPage,
                pageIndex: this.options.startAtPage,
                navigation: {},
                animated: false,
                appended: false,
                hoveredOver: false
            }
        );
    },