mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-26 14:48:52 -03:00
Update Canvas.js
Show Layer
This commit is contained in:
@@ -811,10 +811,12 @@ export class Canvas {
|
|||||||
this.selectedLayers.forEach(layer => {
|
this.selectedLayers.forEach(layer => {
|
||||||
if (!layer.image) return;
|
if (!layer.image) return;
|
||||||
|
|
||||||
|
const layerIndex = this.layers.indexOf(layer);
|
||||||
const currentWidth = Math.round(layer.width);
|
const currentWidth = Math.round(layer.width);
|
||||||
const currentHeight = Math.round(layer.height);
|
const currentHeight = Math.round(layer.height);
|
||||||
const rotation = Math.round(layer.rotation % 360);
|
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 centerX = layer.x + layer.width / 2;
|
||||||
const centerY = layer.y + layer.height / 2;
|
const centerY = layer.y + layer.height / 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user