33 lines
453 B
JavaScript
33 lines
453 B
JavaScript
|
|
|
||
|
|
import icon from "../icon.js";
|
||
|
|
|
||
|
|
export default class fileChooserFileIcon extends icon{
|
||
|
|
|
||
|
|
width = 50;
|
||
|
|
|
||
|
|
height = 50;
|
||
|
|
|
||
|
|
layers = 1;
|
||
|
|
|
||
|
|
backgroundSize = "contain!important"
|
||
|
|
|
||
|
|
create() {
|
||
|
|
|
||
|
|
console.log("icon type", this.parent.fileType);
|
||
|
|
|
||
|
|
|
||
|
|
if( this.parent.fileType == "file" ) {
|
||
|
|
|
||
|
|
this.setImage( "assets/images/icons/file.png" );
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
if( this.parent.fileType == "directory" ) {
|
||
|
|
|
||
|
|
this.setImage( "assets/images/icons/folder.png" )
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|