* web/commons/canvas_helpers.ml: starting factorizing things