From 9aef965db8ea4dbf9ba717e5cf89bb70360974b0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 18 Apr 2025 16:49:36 +0200 Subject: [PATCH] No longer used I assume it was from the old bubble design --- .../controllers/animation_controller.js | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 app/javascript/controllers/animation_controller.js diff --git a/app/javascript/controllers/animation_controller.js b/app/javascript/controllers/animation_controller.js deleted file mode 100644 index f63d36e97..000000000 --- a/app/javascript/controllers/animation_controller.js +++ /dev/null @@ -1,24 +0,0 @@ -import { Controller } from "@hotwired/stimulus" -import { nextFrame } from "helpers/timing_helpers" - -export default class extends Controller { - static classes = [ "play" ] - static values = { playOnLoad: { type: Boolean, default: false } } - - connect() { - if (this.playOnLoadValue) { - this.play() - } - } - - async play() { - await nextFrame() - this.element.classList.remove(this.playClass) - this.#forceReflow() - this.element.classList.add(this.playClass) - } - - #forceReflow() { - this.element.offsetWidth - } -}