impress/app/views/items/_outfit_viewer.html.haml
Matchu 1aba4f405e Add hacky play/pause toggle to new item page preview
This doesn't do a good job maintaining state across morphs, but hey
it's Working At All in terms of wiring, and that's good!!

Also need to style up the toggle as a cute button instead of a visible
checkbox and the words "Play/pause"!
2024-07-08 13:43:28 -07:00

18 lines
No EOL
471 B
Text

%outfit-viewer
.loading-indicator= render partial: "hanger_spinner"
%label.play-pause-button
%input.play-pause-toggle{type: "checkbox"}
Play/pause
- outfit.visible_layers.each do |swf_asset|
%outfit-layer{
data: {
"asset-id": swf_asset.id,
"zone": swf_asset.zone.label,
},
}
- if swf_asset.canvas_movie?
%iframe{src: swf_asset_path(swf_asset)}
- else
= image_tag swf_asset.image_url, alt: ""