Fixing card zoom-in on touchscreens and also allow to scroll the card image in the info dialog using swipes.
This commit is contained in:
@@ -223,6 +223,18 @@ var GempLotrGameUI = Class.extend({
|
|||||||
height: 300
|
height: 300
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var swipeOptions = {
|
||||||
|
threshold: 20,
|
||||||
|
swipeUp: function (event) {
|
||||||
|
that.infoDialog.prop({ scrollTop: that.infoDialog.prop("scrollHeight") });
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
swipeDown: function (event) {
|
||||||
|
that.infoDialog.prop({ scrollTop: 0 });
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.infoDialog.swipe(swipeOptions);
|
||||||
},
|
},
|
||||||
|
|
||||||
layoutUI: function(sizeNotChanged) {
|
layoutUI: function(sizeNotChanged) {
|
||||||
@@ -716,9 +728,12 @@ var GempLotrGameUI = Class.extend({
|
|||||||
threshold: 20,
|
threshold: 20,
|
||||||
swipeUp: function (event) {
|
swipeUp: function (event) {
|
||||||
var tar = $(event.target);
|
var tar = $(event.target);
|
||||||
if (tar.hasClass("borderOverlay")) {
|
if (tar.hasClass("actionArea")) {
|
||||||
var selectedCardElem = tar.parent();
|
tar = tar.parent();
|
||||||
that.displayCardInfo(selectedCardElem.data("card"));
|
if (tar.hasClass("borderOverlay")) {
|
||||||
|
var selectedCardElem = tar.parent();
|
||||||
|
that.displayCardInfo(selectedCardElem.data("card"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user