function setCTM(node, m) {
  const mstr = 'matrix(' + m.a + ',' + m.b + ',' + m.c + ',' + m.d + ',' + m.e + ',' + m.f + ')';
  node.setAttribute('transform', mstr);
}
Gets or sets the current zoom of the canvas, optionally zooming to the
specified position.

The getter may return a cached zoom level. Call it with `false` as the first
argument to force recomputation of the current level.

@param {number|'fit-viewport'} [newScale] The new zoom level, either a number,
i.e. 0.9, or `fit-viewport` to adjust the size to fit the current viewport.
@param {Point} [center] The reference point { x: ..., y: ...} to zoom to.

@return {number} The set zoom level.