mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 03:04:40 +02:00
Merge pull request #5436 from huffman/edit-oob
Show an alert window when new objects would be out of bounds
This commit is contained in:
commit
9783740b21
1 changed files with 16 additions and 13 deletions
|
@ -329,7 +329,7 @@ var toolBar = (function () {
|
||||||
|
|
||||||
Script.setTimeout(resize, RESIZE_INTERVAL);
|
Script.setTimeout(resize, RESIZE_INTERVAL);
|
||||||
} else {
|
} else {
|
||||||
print("Can't add model: Model would be out of bounds.");
|
Window.alert("Can't add model: Model would be out of bounds.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,7 +374,7 @@ var toolBar = (function () {
|
||||||
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
print("Can't create box: Box would be out of bounds.");
|
Window.alert("Can't create box: Box would be out of bounds.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -390,7 +390,7 @@ var toolBar = (function () {
|
||||||
color: { red: 255, green: 0, blue: 0 }
|
color: { red: 255, green: 0, blue: 0 }
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
print("Can't create sphere: Sphere would be out of bounds.");
|
Window.alert("Can't create sphere: Sphere would be out of bounds.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -413,7 +413,7 @@ var toolBar = (function () {
|
||||||
cutoff: 180, // in degrees
|
cutoff: 180, // in degrees
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
print("Can't create Light: Light would be out of bounds.");
|
Window.alert("Can't create Light: Light would be out of bounds.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -433,7 +433,7 @@ var toolBar = (function () {
|
||||||
lineHeight: 0.06
|
lineHeight: 0.06
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
print("Can't create box: Text would be out of bounds.");
|
Window.alert("Can't create box: Text would be out of bounds.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -449,7 +449,7 @@ var toolBar = (function () {
|
||||||
sourceUrl: "https://highfidelity.com/",
|
sourceUrl: "https://highfidelity.com/",
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
print("Can't create Web Entity: would be out of bounds.");
|
Window.alert("Can't create Web Entity: would be out of bounds.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -464,7 +464,7 @@ var toolBar = (function () {
|
||||||
dimensions: { x: 10, y: 10, z: 10 },
|
dimensions: { x: 10, y: 10, z: 10 },
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
print("Can't create box: Text would be out of bounds.");
|
Window.alert("Can't create box: Text would be out of bounds.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -482,7 +482,7 @@ var toolBar = (function () {
|
||||||
voxelSurfaceStyle: 1
|
voxelSurfaceStyle: 1
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
print("Can't create PolyVox: would be out of bounds.");
|
Window.alert("Can't create PolyVox: would be out of bounds.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1068,13 +1068,16 @@ function importSVO(importURL) {
|
||||||
if (Clipboard.getClipboardContentsLargestDimension() < VERY_LARGE) {
|
if (Clipboard.getClipboardContentsLargestDimension() < VERY_LARGE) {
|
||||||
position = getPositionToCreateEntity();
|
position = getPositionToCreateEntity();
|
||||||
}
|
}
|
||||||
var pastedEntityIDs = Clipboard.pasteEntities(position);
|
if (position.x > 0 && position.y > 0 && position.z > 0) {
|
||||||
|
var pastedEntityIDs = Clipboard.pasteEntities(position);
|
||||||
if (isActive) {
|
|
||||||
selectionManager.setSelections(pastedEntityIDs);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (isActive) {
|
||||||
|
selectionManager.setSelections(pastedEntityIDs);
|
||||||
|
}
|
||||||
Window.raiseMainWindow();
|
Window.raiseMainWindow();
|
||||||
|
} else {
|
||||||
|
Window.alert("Can't import objects: objects would be out of bounds.");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Window.alert("There was an error importing the entity file.");
|
Window.alert("There was an error importing the entity file.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue