Various fixes

Make Project res compensation available for non single_texture projects if only one texture exists
Prevent selection rect on touch devices
Fix issue with UV mapping preview for box UV
This commit is contained in:
JannisX11 2020-10-03 23:51:24 +02:00
parent f0db857023
commit 8162493621
3 changed files with 8 additions and 8 deletions

View File

@ -672,14 +672,14 @@ const Canvas = {
var p = {}
p.from = face_list[1].from.slice()
p.size = face_list[1].size.slice()
p.from = face_list[0].from.slice()
p.size = face_list[0].size.slice()
face_list[1].from = face_list[3].from.slice()
face_list[1].size = face_list[3].size.slice()
face_list[0].from = face_list[1].from.slice()
face_list[0].size = face_list[1].size.slice()
face_list[3].from = p.from.slice()
face_list[3].size = p.size.slice()
face_list[1].from = p.from.slice()
face_list[1].size = p.size.slice()
}
let fIndex = 0;

View File

@ -683,7 +683,7 @@ class Preview {
}
return
};
if (!Modes.edit) return;
if (!Modes.edit || event.type == 'touchstart') return;
$(this.node).append(this.selection.box)
this.selection.activated = settings.canvas_unselect.value;

View File

@ -774,7 +774,7 @@ class Texture {
delete Painter.current.canvas;
}
scope.keep_size = true;
if (formResult.fill !== 'stretch' && Format.single_texture) {
if (formResult.fill !== 'stretch' && (Format.single_texture || Texture.all.length == 1)) {
Undo.current_save.uv_mode = {
box_uv: Project.box_uv,
width: Project.texture_width,