Move checkLayoutPosition method to canvas-image-layer

Some renaming and cleaning up code.