Fix display mode not working on mobile

Fix mobile Alt key override not affecting resize tool
Change order of bbmodel import to prioritize relative paths
This commit is contained in:
JannisX11 2021-06-27 23:25:46 +02:00
parent f3f9f7bb2d
commit 1a66d8f3e0
3 changed files with 9 additions and 9 deletions

View File

@ -1597,7 +1597,7 @@ function loadDisp(key) { //Loads The Menu and slider values, common for all Radi
display_preview.controls.enabled = true;
ground_animation = false;
$('#display_crosshair').detach()
display_preview.orbit_gizmo.unhide();
if (display_preview.orbit_gizmo) display_preview.orbit_gizmo.unhide();
display_preview.camPers.setFocalLength(45)
if (display[key] == undefined) {
@ -1648,7 +1648,7 @@ DisplayMode.loadFirstRight = function() { //Loader
focal_length: getOptimalFocalLength(),
})
display_preview.controls.enabled = false
display_preview.orbit_gizmo.hide();
if (display_preview.orbit_gizmo) display_preview.orbit_gizmo.hide();
displayReferenceObjects.bar(['monitor', 'bow', 'crossbow'])
$('.single_canvas_wrapper').append('<div id="display_crosshair"></div>')
}
@ -1660,7 +1660,7 @@ DisplayMode.loadFirstLeft = function() { //Loader
focal_length: getOptimalFocalLength(),
})
display_preview.controls.enabled = false
display_preview.orbit_gizmo.hide();
if (display_preview.orbit_gizmo) display_preview.orbit_gizmo.hide();
displayReferenceObjects.bar(['monitor', 'bow', 'crossbow'])
$('.single_canvas_wrapper').append('<div id="display_crosshair"></div>')
}
@ -1684,7 +1684,7 @@ DisplayMode.loadGUI = function() { //Loader
locked_angle: 'south',
zoom: 1,
})
display_preview.orbit_gizmo.hide();
if (display_preview.orbit_gizmo) display_preview.orbit_gizmo.hide();
displayReferenceObjects.bar(['inventory_nine', 'inventory_full', 'hud'])
BarItems.gui_light.set(Project.front_gui_light ? 'front' : 'side');
}

View File

@ -240,10 +240,6 @@ var codec = new Codec('project', {
if (model.textures) {
model.textures.forEach(tex => {
var tex_copy = new Texture(tex, tex.uuid).add(false);
if (isApp && tex.path && fs.existsSync(tex.path) && !model.meta.backup) {
tex_copy.fromPath(tex.path)
return;
}
if (isApp && tex.relative_path && ModelMeta.save_path) {
let resolved_path = PathModule.resolve(ModelMeta.save_path, tex.relative_path);
if (fs.existsSync(resolved_path)) {
@ -251,6 +247,10 @@ var codec = new Codec('project', {
return;
}
}
if (isApp && tex.path && fs.existsSync(tex.path) && !model.meta.backup) {
tex_copy.fromPath(tex.path)
return;
}
if (tex.source && tex.source.substr(0, 5) == 'data:') {
tex_copy.fromDataURL(tex.source)
}

View File

@ -1236,7 +1236,7 @@
selected.forEach(function(obj, i) {
if (obj.resizable) {
obj.resize(point[axis], axisNumber, !scope.direction, null, event.altKey)
obj.resize(point[axis], axisNumber, !scope.direction, null, event.altKey || Pressing.overrides.alt)
}
})
displayDistance(point[axis] * (scope.direction ? 1 : -1));