In the most recent revision I removed a ClearAllPoints() call on the castbar's spell name (castBar.cname).
Overall I removed the events and handler that dealt with spell casts.
Code:
575: -- castBar:SetScript("OnEvent", CastbarEvents)
576: -- castBar:RegisterEvent("UNIT_SPELLCAST_INTERRUPTIBLE")
577: -- castBar:RegisterEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE")
578: -- castBar:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START")
579: -- castBar:RegisterEvent("UNIT_SPELLCAST_START")
Added references to the spell name and spell backdrop regions that already exist and hid them.
Code:
492: local _, castbarOverlay, shieldedRegion, spellIconRegion, spellName, spellBackdrop = castBar:GetRegions()
569: castBar.spellName = spellName
570: spellName:Hide()
703: spellBackdrop:SetTexture("")
And made the castbar's spell name text make use of the spellName region that already exists.
Code:
111: local oldname = self.spellName:GetText()
112: self.cname:SetText(oldname and (len(oldname) > 20) and gsub(oldname, "%s?(.[\128-\191]*)%S+%s", "%1. ") or oldname)
I also removed (commented out) or fixed anything that made use of castBar's channeling, casting, and controller variables as they're no longer needed.