mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Fix #1891 Cannot add reference images in orthographic
Fix reference image error
This commit is contained in:
parent
e4ad887923
commit
9f7fe3719d
@ -939,7 +939,6 @@ window.MessageBox = class MessageBox extends Dialog {
|
||||
close(button, result, event) {
|
||||
if (this.callback) {
|
||||
let allow_close = this.callback(button, result, event);
|
||||
console.log(allow_close)
|
||||
if (allow_close === false) return;
|
||||
}
|
||||
this.hide();
|
||||
|
@ -100,7 +100,7 @@ class ReferenceImage {
|
||||
}
|
||||
addAsReference(save) {
|
||||
Project.reference_images.push(this);
|
||||
if (Preview.selected && Preview.selected.isOrtho) this.changeLayer('blueprint');
|
||||
if (Preview.selected && Preview.selected.angle) this.changeLayer('blueprint');
|
||||
this.scope = 'project';
|
||||
this.update();
|
||||
if (save) this.save();
|
||||
@ -108,7 +108,7 @@ class ReferenceImage {
|
||||
}
|
||||
addAsGlobalReference(save) {
|
||||
ReferenceImage.global.push(this);
|
||||
if (Preview.selected && Preview.selected.isOrtho) this.changeLayer('blueprint');
|
||||
if (Preview.selected && Preview.selected.angle) this.changeLayer('blueprint');
|
||||
this.scope = 'global';
|
||||
this.update();
|
||||
if (save) this.save();
|
||||
@ -256,7 +256,7 @@ class ReferenceImage {
|
||||
pos_x += preview.width/2;
|
||||
pos_y += preview.height/2;
|
||||
|
||||
if (quad_previews.enabled) {
|
||||
if (Preview.split_screen.enabled) {
|
||||
pos_x += preview.node.parentElement.offsetLeft;
|
||||
pos_y += preview.node.parentElement.offsetTop;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user