The temporary layer (tmp layer) will store selections while the user decides where to put them, so that content below it doesn't get overridden.
At the moment there's a bug in the getCursorPos function, may have something to do with offsets. The rect is correctly drawn, but with a weird offset. Added vfx canvas for tools previews.