mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-19 17:47:25 +02:00
* 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
17 lines
538 B
JavaScript
17 lines
538 B
JavaScript
/* 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) : ""
|
|
}
|