only scroll to embed select if using buttons
This commit is contained in:
parent
733c7c5c5f
commit
a2d04e957c
1 changed files with 5 additions and 4 deletions
|
@ -55,7 +55,8 @@ pandora.ui.textPanel = function() {
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
that.selectEmbed(
|
that.selectEmbed(
|
||||||
selected < embedURLs.length - 1 ? selected + 1 : 0
|
selected < embedURLs.length - 1 ? selected + 1 : 0,
|
||||||
|
true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -89,7 +90,8 @@ pandora.ui.textPanel = function() {
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
that.selectEmbed(
|
that.selectEmbed(
|
||||||
selected ? selected - 1 : embedURLs.length - 1
|
selected ? selected - 1 : embedURLs.length - 1,
|
||||||
|
true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -168,7 +170,7 @@ pandora.ui.textPanel = function() {
|
||||||
that.replaceElement(1, $panel);
|
that.replaceElement(1, $panel);
|
||||||
that.replaceElement(2, $statusbar);
|
that.replaceElement(2, $statusbar);
|
||||||
|
|
||||||
embedURLs.length && that.selectEmbed(0, false);
|
embedURLs.length && that.selectEmbed(0);
|
||||||
pandora.user.ui.texts[pandora.user.ui.text] &&
|
pandora.user.ui.texts[pandora.user.ui.text] &&
|
||||||
pandora.$ui.text.scrollTo(pandora.user.ui.texts[pandora.user.ui.text].position || 0);
|
pandora.$ui.text.scrollTo(pandora.user.ui.texts[pandora.user.ui.text].position || 0);
|
||||||
});
|
});
|
||||||
|
@ -194,7 +196,6 @@ pandora.ui.textPanel = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
that.selectEmbed = function(index, scroll) {
|
that.selectEmbed = function(index, scroll) {
|
||||||
scroll = arguments.length == 1 || scroll;
|
|
||||||
if (index != selected) {
|
if (index != selected) {
|
||||||
selected = index;
|
selected = index;
|
||||||
selectedURL = embedURLs[selected]
|
selectedURL = embedURLs[selected]
|
||||||
|
|
Loading…
Reference in a new issue