d3 drawing rectangles and dragging

I think you meant to nest these in `.state {} ` above. Otherwise, they will get applied to all `line`s and `rect`s in the dom.