From 7af1a971616683911403e205e8944b38c28ffb9a Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Sat, 24 Feb 2024 16:31:05 -0800 Subject: [PATCH] Read known_glitches when loading alt styles SWF assets I'm not sure why I had marked this as TODO before? Maybe I'm missing something? But for now I'll just wire it in, I guess! --- app/controllers/alt_styles_controller.rb | 2 +- app/javascript/wardrobe-2020/loaders/alt-styles.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/alt_styles_controller.rb b/app/controllers/alt_styles_controller.rb index de7acc4e..e1e99ff9 100644 --- a/app/controllers/alt_styles_controller.rb +++ b/app/controllers/alt_styles_controller.rb @@ -22,7 +22,7 @@ class AltStylesController < ApplicationController swf_assets: { only: [:id, :body_id], include: [:zone], - methods: [:urls], + methods: [:urls, :known_glitches], } }, methods: [:series_name, :adjective_name, :thumbnail_url], diff --git a/app/javascript/wardrobe-2020/loaders/alt-styles.js b/app/javascript/wardrobe-2020/loaders/alt-styles.js index 15d4ca27..668745ac 100644 --- a/app/javascript/wardrobe-2020/loaders/alt-styles.js +++ b/app/javascript/wardrobe-2020/loaders/alt-styles.js @@ -70,7 +70,7 @@ function normalizeSwfAssetToLayer(swfAssetData) { label: swfAssetData.zone.label, }, bodyId: swfAssetData.body_id, - knownGlitches: [], // TODO + knownGlitches: swfAssetData.known_glitches, svgUrl: swfAssetData.urls.svg, canvasMovieLibraryUrl: swfAssetData.urls.canvas_library,