initialize: function()

in package/src/components/CanvasTable/FabricCell.js [10:31]


  initialize: function (cell, { borderColor, backgroundColor }) {
    const { x, y, w, h } = cell
    fabric.Rect.prototype.initialize.call(this, {
      left: x,
      top: y,
      width: w,
      height: h,
      scaleX: SIZE_INITIAL_SCALE,
      scaleY: SIZE_INITIAL_SCALE,
      stroke: borderColor,
      fill: backgroundColor,
      cornerColor: COLORS.TABLE_BORDER,
      strokeWidth: SIZE_CELL_BORDER,
      cornerSize: SIZE_CELL_CORNER,
      transparentCorners: false,
      objectCaching: false,
      strokeUniform: true,
      selectable: true,
      lockScalingFlip: true,
      data: cell
    })
  }