fix seeding in framed settings
This commit is contained in:
parent
4182de3349
commit
5082e552cd
1 changed files with 14 additions and 12 deletions
26
js/kiri.js
26
js/kiri.js
|
|
@ -2022,7 +2022,7 @@ self.kiri.license = exports.LICENSE;
|
||||||
for (var i=0; i<files.length; i++) {
|
for (var i=0; i<files.length; i++) {
|
||||||
var reader = new FileReader(),
|
var reader = new FileReader(),
|
||||||
lower = files[i].name.toLowerCase(),
|
lower = files[i].name.toLowerCase(),
|
||||||
israw = lower.indexOf(".raw") > 0,
|
israw = lower.indexOf(".raw") > 0 || lower.indexOf('.') < 0,
|
||||||
isstl = lower.indexOf(".stl") > 0,
|
isstl = lower.indexOf(".stl") > 0,
|
||||||
issvg = lower.indexOf(".svg") > 0,
|
issvg = lower.indexOf(".svg") > 0,
|
||||||
isgcode = lower.indexOf(".gcode") > 0 || lower.indexOf(".nc") > 0;
|
isgcode = lower.indexOf(".gcode") > 0 || lower.indexOf(".nc") > 0;
|
||||||
|
|
@ -3820,17 +3820,19 @@ self.kiri.license = exports.LICENSE;
|
||||||
|
|
||||||
function checkSeed(ondone) {
|
function checkSeed(ondone) {
|
||||||
// skip sample object load in onshape (or any script postload)
|
// skip sample object load in onshape (or any script postload)
|
||||||
if (!SDB[SEED] && !SETUP.s) {
|
if (!SDB[SEED]) {
|
||||||
loadSTL("/obj/cube.stl", function(vert) {
|
SDB[SEED] = new Date().getTime();
|
||||||
CATALOG.putFile("sample cube.stl", vert);
|
if (!SETUP.s) {
|
||||||
SDB[SEED] = new Date().getTime();
|
loadSTL("/obj/cube.stl", function(vert) {
|
||||||
platformComputeMaxZ();
|
CATALOG.putFile("sample cube.stl", vert);
|
||||||
SPACE.view.home();
|
platformComputeMaxZ();
|
||||||
setTimeout(saveWorkspace,500);
|
SPACE.view.home();
|
||||||
ondone();
|
setTimeout(saveWorkspace,500);
|
||||||
showHelpLocal();
|
ondone();
|
||||||
});
|
showHelpLocal();
|
||||||
return true;
|
});
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue