Update canvas.js

it permit to define regions directly during canvas instantiation.