From 66e6e6586f47034d1a08f45b0e1acb2414eab02d Mon Sep 17 00:00:00 2001 From: Dariusz L Date: Fri, 20 Jun 2025 20:24:40 +0200 Subject: [PATCH] Update Canvas.js Show Layer --- js/Canvas.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/Canvas.js b/js/Canvas.js index 1e3e5e6..4848b68 100644 --- a/js/Canvas.js +++ b/js/Canvas.js @@ -811,10 +811,12 @@ export class Canvas { this.selectedLayers.forEach(layer => { if (!layer.image) return; + const layerIndex = this.layers.indexOf(layer); const currentWidth = Math.round(layer.width); const currentHeight = Math.round(layer.height); const rotation = Math.round(layer.rotation % 360); - const text = `${currentWidth}x${currentHeight} | ${rotation}°`; + const text = `${currentWidth}x${currentHeight} | ${rotation}° | Layer #${layerIndex + 1}`; + const centerX = layer.x + layer.width / 2; const centerY = layer.y + layer.height / 2;