palette now attempts to stay on within the viewport, reduced number of event listeners