Class: AnimateIt::FramesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/animate_it/frames_controller.rb

Constant Summary

Constants inherited from ApplicationController

ApplicationController::NullPolicy

Instance Method Summary collapse

Instance Method Details

#filmstripObject



17
18
19
20
# File 'app/controllers/animate_it/frames_controller.rb', line 17

def filmstrip
  @composition = composition
  @props = preview_props
end

#showObject



6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/animate_it/frames_controller.rb', line 6

def show
  @composition = composition
  @frame = params[:frame].to_i
  @content = @composition.render_frame(view_context, frame: @frame, props: preview_props)
  # `?only=body` returns just the .animate-it-frame element (no <head> /
  # stylesheets) so the studio can morph it into a persistent document
  # instead of reloading the whole frame doc. The full-document render is
  # what the Playwright render pipeline uses — left untouched.
  render(:fragment) if params[:only] == "body"
end