+2
-1
changelog
+2
-1
changelog
-2
src-tauri/src/frontend_calls/load_photos.rs
-2
src-tauri/src/frontend_calls/load_photos.rs
+2
-2
src/Components/Managers/PhotoListRenderingManager.tsx
+2
-2
src/Components/Managers/PhotoListRenderingManager.tsx
···
124
124
let photo = (el as PhotoListPhoto).Photo;
125
125
126
126
// === DEBUG ===
127
-
// ctx.strokeStyle = '#f00';
128
-
// ctx.strokeRect((rowXPos - row.Width / 2) + canvas.width / 2, currentY - scroll, photo.scaledWidth!, row.Height);
127
+
ctx.strokeStyle = '#f00';
128
+
ctx.strokeRect((rowXPos - row.Width / 2) + canvas.width / 2, currentY - scroll, photo.scaledWidth!, row.Height);
129
129
130
130
if(!photo.loaded)
131
131
// If the photo is not loaded, start a new task and load it in that task
+4
-1
src/Components/Managers/PhotoManager.tsx
+4
-1
src/Components/Managers/PhotoManager.tsx
···
89
89
});
90
90
91
91
this.Photos = MergeSort(this.Photos);
92
-
console.log(this.Photos);
92
+
console.log(this.Photos[0]);
93
93
94
94
console.log(this.Photos.length + ' Photos found.');
95
+
95
96
if(this.Photos.length === 0 || photoPaths.length > Vars.MAX_PHOTOS_BULK_LOAD){
96
97
console.log('No photos found or over bulk load limit, Skipping loading stage.');
97
98
···
128
129
129
130
photo.metaLoaded = true;
130
131
photo.onMetaLoaded();
132
+
133
+
window.PhotoListRenderingManager.ComputeLayout();
131
134
132
135
if(this._amountLoaded === this.Photos.length - 1 && !this.HasFirstLoaded){
133
136
this.FilteredPhotos = this.Photos;
-1
src/Components/PhotoList.tsx
-1
src/Components/PhotoList.tsx
+7
src/Components/PhotoViewer.tsx
+7
src/Components/PhotoViewer.tsx
···
367
367
)
368
368
}
369
369
370
+
let toggleLayerManager = () => {
371
+
372
+
}
373
+
374
+
// TODO: Make layers selectable
375
+
370
376
return (
371
377
<div class="photo-viewer" ref={( el ) => viewer = el}>
372
378
<div class="photo-context-menu" ref={( el ) => viewerContextMenu = el}>
···
442
448
443
449
<Show when={window.PhotoViewerManager.CurrentPhoto()?.isMultiLayer}>
444
450
<div class="viewer-button"
451
+
onClick={toggleLayerManager}
445
452
onMouseOver={( el ) => animate(el.currentTarget, { width: '40px', height: '40px', 'margin-left': '15px', 'margin-right': '15px', 'margin-top': '-10px' })}
446
453
onMouseLeave={( el ) => animate(el.currentTarget, { width: '30px', height: '30px', 'margin-left': '20px', 'margin-right': '20px', 'margin-top': '0px' })}
447
454
>
+11
-11
src/Components/Structs/Photo.ts
+11
-11
src/Components/Structs/Photo.ts
···
75
75
else
76
76
resSplit = split[3].split('x')
77
77
78
-
let width = parseInt(resSplit[0]);
79
-
let height = parseInt(resSplit[1]);
78
+
// let width = parseInt(resSplit[0]);
79
+
// let height = parseInt(resSplit[1]);
80
80
81
-
if(!isNaN(width) || !isNaN(height)){
82
-
this.width = width;
83
-
this.height = height;
84
-
85
-
let scale = Vars.PHOTO_HEIGHT / this.height;
86
-
87
-
this.scaledWidth = this.width * scale;
88
-
this.scaledHeight = Vars.PHOTO_HEIGHT;
89
-
}
81
+
// if(!isNaN(width) || !isNaN(height)){
82
+
// this.width = width;
83
+
// this.height = height;
84
+
85
+
// let scale = Vars.PHOTO_HEIGHT / this.height;
86
+
87
+
// this.scaledWidth = this.width * scale;
88
+
// this.scaledHeight = Vars.PHOTO_HEIGHT;
89
+
// }
90
90
}
91
91
92
92
loadMeta(){