Skip to content

Commit

Permalink
#4707 - Covers don't work correctly on Android devices
Browse files Browse the repository at this point in the history
  • Loading branch information
romanlesnikov committed Sep 2, 2024
1 parent d3e6fe5 commit 414bf2b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
11 changes: 10 additions & 1 deletion inc/js/classes/BxDolUploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,14 @@ BxDolImageTweak.prototype.changePosition = function (){
$(".bx-image-edit-source-" + $this._sUniqueId).parent().find('.bx-image-edit-move-info').remove();
$(".bx-image-edit-source-" + $this._sUniqueId).css('background-position', " 0px " + e.offsetY / $(e.currentTarget).height() * 100 + '%');
});
if (window.innerWidth <= 800){
$('body').css('overflow', 'hidden')
$(".bx-image-edit-source-" + $this._sUniqueId).bind('touchmove', function(e){
var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
$(".bx-image-edit-source-" + $this._sUniqueId).parent().find('.bx-image-edit-move-info').remove();
$(".bx-image-edit-source-" + $this._sUniqueId).css('background-position', " 0px " + touch.pageY / $(e.currentTarget).height() * 100 + '%');
});
}
with ($this._oContainerButtons) {
find('.bx-image-edit-buttons-cancel').removeClass('hidden');
find('.bx-image-edit-buttons-save').removeClass('hidden');
Expand All @@ -1120,8 +1128,9 @@ BxDolImageTweak.prototype.changePosition = function (){

BxDolImageTweak.prototype.cancelPosition = function (){
var $this = this;
$('body').css('overflow', '')
$(".bx-image-edit-source-" + $this._sUniqueId).parent().find('.bx-image-edit-move-info').remove();
$(".bx-image-edit-source-" + $this._sUniqueId).addClass('bx-image-edit-move').unbind('dragover');
$(".bx-image-edit-source-" + $this._sUniqueId).addClass('bx-image-edit-move').unbind('dragover').unbind('touchmove');

with ($this._oContainerButtons) {
find('.bx-image-edit-buttons-cancel').addClass('hidden');
Expand Down
3 changes: 3 additions & 0 deletions modules/boonex/artificer/data/template/system/css/cover.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ import url(../../../../../../../template/css/cover.css);
position: relative;
z-index: 99;
}
.bg-cover{
background-size: 100% auto !important;
}
.bx-image-edit-move-info{
display: flex;
align-items: center;
Expand Down
3 changes: 3 additions & 0 deletions template/css/cover.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
position: relative;
z-index: 99;
}
.bg-cover{
background-size: 100% auto !important;
}
.bx-image-edit-move-info{
display: flex;
align-items: center;
Expand Down

1 comment on commit 414bf2b

@272development
Copy link

@272development 272development commented on 414bf2b Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see

https://unacms.com/cmts-view/1tl8eyo?sys=bx_forum&cmt_id=49943

There are bugs in this fix. Please incorporate above fixes into codebase 👍

Please sign in to comment.