From 76d2cc6c21631855bc5bfcb52f7f760a5650585c Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Tue, 2 Jul 2024 22:38:18 -0700 Subject: [PATCH] Add some data attributes to outfit-layer elements This is mostly for debugging, the zone label especially, to just eyeball what we're looking at! --- app/views/items/show.html.haml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/items/show.html.haml b/app/views/items/show.html.haml index 6b17f3e6..856d6537 100644 --- a/app/views/items/show.html.haml +++ b/app/views/items/show.html.haml @@ -16,7 +16,12 @@ = turbo_frame_tag "item-preview" do .outfit-viewer - @preview_outfit.visible_layers.each do |swf_asset| - %outfit-layer + %outfit-layer{ + data: { + "asset-id": swf_asset.id, + "zone": swf_asset.zone.label, + }, + } = image_tag swf_asset.image_url, alt: "" = form_for item_path(@item), method: :get, class: "species-color-picker",