Add support for canvas layers

please match surrounding code style - this indentation is different.