demos/bp/public/editor-compiled.js
// override is either a string css color or function.
override is either a string css color or function.
override is either a string css color or function .
drawCells(ctx, points, override) {
    const size = this.view.size;
    points.forEach((tx, ty, v) => {
      const {px, py} = this.view.worldToScreen(tx, ty);
      if (px + size < 0 || px >= this.width || py + size < 0 || py >= this.height)
        return;
      const style = (typeof override === 'function') ? override(tx, ty, v)
        : override ? override
        : COLORS[v] || 'red';
      if (style == null) return;
      ctx.fillStyle = style;
      ctx.fillRect(px, py, size, size);
    });
  }
drawCells ( ctx , points , override ) { const size = this . view . size ; points . forEach ( ( tx , ty , v ) => { const { px , py } = this . view . worldToScreen ( tx , ty ) ; if ( px + size < 0 || px >= this . width || py + size < 0 || py >= this . height ) return ; const style = ( typeof override === 'function' ) ? override ( tx , ty , v ) : override ? override : COLORS [ v ] || 'red' ; if ( style == null ) return ; ctx . fillStyle = style ; ctx . fillRect ( px , py , size , size ) ; } ) ; }
override is either a string css color or function.
override is either a string css color or function .