Preparing code for live preview of dragged lines