A JavaScript constructor for conditionally locking elements in a fixed position.