[ui] better UI Components split + improvements

* add WorkspaceView that contains Meshroom main modules (ImageGallery, 2D/3D viewer)
* add Panel component to standardize UI modules layout
* ImageGallery: 
  * add images basename on image delegates
  * add explanatory placeholder when no image has been added to the reconstruction yet
This commit is contained in:
Yann Lanthony 2017-12-14 19:11:52 +01:00
parent e5acd916dc
commit 8d8bf0be5e
5 changed files with 387 additions and 190 deletions

View file

@ -0,0 +1,17 @@
/* Utility functions to manipulate file paths */
/// Returns the directory name of the given path.
function dirname(path) {
return path.substring(0, path.lastIndexOf('/'))
}
/// Returns the basename (file.extension) of the given path.
function basename(path) {
return path.substring(path.lastIndexOf('/') + 1, path.length)
}
/// Return the extension (prefixed by a '.') of the given path.
function extension(path) {
var dot_pos = path.lastIndexOf('.');
return dot_pos > -1 ? path.substring(dot_pos, path.length) : ""
}