animation UI for dragging

added 'active' state
refactor dragging state
set class rather than style properties in js