clean up file name, button presentation
This commit is contained in:
parent
e5be3ae81d
commit
6204d3fc63
3 changed files with 23 additions and 4 deletions
|
|
@ -50,7 +50,12 @@ mesh.model = class MeshModel extends mesh.object {
|
|||
return;
|
||||
}
|
||||
|
||||
this.file = file;
|
||||
// remove file name extensions
|
||||
let text = file || '';
|
||||
let dot = text.lastIndexOf('.');
|
||||
if (dot > 0) file = text.substring(0, dot);
|
||||
|
||||
this.file = file || 'unnamed';
|
||||
this.mesh = this.load(mesh);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue