Skip to content

Commit

Permalink
DnD fron filemngr in prog
Browse files Browse the repository at this point in the history
  • Loading branch information
chinonso098 committed Oct 5, 2024
1 parent 8c92947 commit 86aef4c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/system-apps/filemanager/filemanager.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ img{

.shortcut-img{
position: absolute;
display: none;
/* display: none; */
height: 24px;
width: 24px;
top: 32%;
Expand Down
4 changes: 2 additions & 2 deletions src/app/system-apps/filemanager/filemanager.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<ol (dragover)="onDragOver($event)" (drop)="onDrop($event)" (click)="hideIconContextMenu(name)" (click)="handleIconHighLightState()" #myBounds>
<li *ngFor="let file of files; let i = index">
<li *ngFor="let file of files; let i = index" id="liIconBtn{{i}}">
<button (dblclick)="runProcess(file)" (mouseenter)="onMouseEnter(i)" (mouseleave)="onMouseLeave(i)"
ngDraggable [bounds]="myBounds" [inBounds]="true" [gridSize]="gridSize" zIndex="1" [preventDefaultEvent]="true"
(stopped)="onDragEnd($event)" (started)="onDragStart($event)"
(stopped)="onDragEnd($event)" (started)="onDragStart($event, i)"
(contextmenu)="onShowIconContextMenu($event, file, i)" (click)="onBtnClick(i)"
id="iconBtn{{i}}" [style]="btnStyle">
<figure>
Expand Down
12 changes: 9 additions & 3 deletions src/app/system-apps/filemanager/filemanager.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export class FileManagerComponent implements BaseComponent, OnInit, AfterViewIni
}
}, this.SECONDS_DELAY[1]);
}

async runProcess(file:FileInfo):Promise<void>{

console.log('filemanager-runProcess:',file)
Expand Down Expand Up @@ -365,8 +365,14 @@ export class FileManagerComponent implements BaseComponent, OnInit, AfterViewIni
console.log('TODO:FileManagerComponent, Upgrade the basic state tracking/management logic:',transform);
}

onDragStart(evt:any):void{
//
onDragStart(evt:any, i:number):void{
const btnIcon = document.getElementById(`liIconBtn${i}`) as HTMLElement
console.log('DragStart:',btnIcon);
if(btnIcon){
// btnIcon.style.position = 'absolute';
btnIcon.style.zIndex = '4';
}
console.log('DragStart:',btnIcon);
}

onMouseEnter(id:number):void{
Expand Down
2 changes: 1 addition & 1 deletion src/app/system-apps/startmenu/startmenu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class StartMenuComponent implements OnInit, AfterViewInit {

setTimeout(async () => {
await this.loadFilesInfoAsync();
}, 1000);
}, this.SECONDS_DELAY);
//
this.removeVantaJSSideEffect();
}
Expand Down

0 comments on commit 86aef4c

Please sign in to comment.