How to use the handsontable/3rdparty/walkontable/src.CellCoords function in handsontable

To help you get started, we’ve selected a few handsontable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Graphite-Docs / graphite / node_modules / handsontable-pro / es / plugins / nestedHeaders / nestedHeaders.js View on Github external
from.col = _ref[0];
          to.col = _ref[1];
        }

        if (colspan > 1) {
          blockCalculations.column = true;
          blockCalculations.cell = true;

          this.hot.selection.setSelectedHeaders(false, true);

          if (from.col === to.col) {
            if (lastColIndex <= from.col && coords.col < from.col) {
              this.hot.selection.setRangeStartOnly(new CellCoords(from.row, to.col));
              this.hot.selection.setRangeEnd(new CellCoords(to.row, coords.col));
            } else {
              this.hot.selection.setRangeStartOnly(new CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
              this.hot.selection.setRangeEnd(new CellCoords(to.row, lastColIndex > to.col ? lastColIndex : to.col));
            }
          }
          if (from.col < to.col) {
            this.hot.selection.setRangeStartOnly(new CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
            this.hot.selection.setRangeEnd(new CellCoords(to.row, lastColIndex));
          }
          if (from.col > to.col) {
            this.hot.selection.setRangeStartOnly(new CellCoords(from.row, from.col));
            this.hot.selection.setRangeEnd(new CellCoords(to.row, coords.col));
          }
        }
      }
    }
github Graphite-Docs / graphite / node_modules / handsontable-pro / commonjs / plugins / nestedHeaders / nestedHeaders.js View on Github external
to.col = _ref[1];
        }

        if (colspan > 1) {
          blockCalculations.column = true;
          blockCalculations.cell = true;

          this.hot.selection.setSelectedHeaders(false, true);

          if (from.col === to.col) {
            if (lastColIndex <= from.col && coords.col < from.col) {
              this.hot.selection.setRangeStartOnly(new _src.CellCoords(from.row, to.col));
              this.hot.selection.setRangeEnd(new _src.CellCoords(to.row, coords.col));
            } else {
              this.hot.selection.setRangeStartOnly(new _src.CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
              this.hot.selection.setRangeEnd(new _src.CellCoords(to.row, lastColIndex > to.col ? lastColIndex : to.col));
            }
          }
          if (from.col < to.col) {
            this.hot.selection.setRangeStartOnly(new _src.CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
            this.hot.selection.setRangeEnd(new _src.CellCoords(to.row, lastColIndex));
          }
          if (from.col > to.col) {
            this.hot.selection.setRangeStartOnly(new _src.CellCoords(from.row, from.col));
            this.hot.selection.setRangeEnd(new _src.CellCoords(to.row, coords.col));
          }
        }
      }
    }
github Graphite-Docs / graphite / node_modules / handsontable-pro / src / plugins / nestedHeaders / nestedHeaders.js View on Github external
changeDirection = true;
      }

      if (changeDirection) {
        [from.col, to.col] = [to.col, from.col];
      }

      if (colspan > 1) {
        blockCalculations.column = true;
        blockCalculations.cell = true;

        this.hot.selection.setSelectedHeaders(false, true);

        if (from.col === to.col) {
          if (lastColIndex <= from.col && coords.col < from.col) {
            this.hot.selection.setRangeStartOnly(new CellCoords(from.row, to.col));
            this.hot.selection.setRangeEnd(new CellCoords(to.row, coords.col));
          } else {
            this.hot.selection.setRangeStartOnly(new CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
            this.hot.selection.setRangeEnd(new CellCoords(to.row, lastColIndex > to.col ? lastColIndex : to.col));
          }
        }
        if (from.col < to.col) {
          this.hot.selection.setRangeStartOnly(new CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
          this.hot.selection.setRangeEnd(new CellCoords(to.row, lastColIndex));

        }
        if (from.col > to.col) {
          this.hot.selection.setRangeStartOnly(new CellCoords(from.row, from.col));
          this.hot.selection.setRangeEnd(new CellCoords(to.row, coords.col));
        }
      }
github Graphite-Docs / graphite / node_modules / handsontable-pro / es / plugins / nestedHeaders / nestedHeaders.js View on Github external
value: function onAfterOnCellMouseDown(event, coords, TD) {
      if (coords.row < 0) {
        var colspan = this.getColspan(coords.row, coords.col);
        var lastColIndex = coords.col + colspan - 1;

        if (colspan > 1) {
          var lastRowIndex = this.hot.countRows() - 1;
          this.hot.selection.setRangeEnd(new CellCoords(lastRowIndex, lastColIndex));
        }
      }
    }
github Graphite-Docs / graphite / node_modules / handsontable-pro / src / plugins / nestedHeaders / nestedHeaders.js View on Github external
[from.col, to.col] = [to.col, from.col];
      }

      if (colspan > 1) {
        blockCalculations.column = true;
        blockCalculations.cell = true;

        this.hot.selection.setSelectedHeaders(false, true);

        if (from.col === to.col) {
          if (lastColIndex <= from.col && coords.col < from.col) {
            this.hot.selection.setRangeStartOnly(new CellCoords(from.row, to.col));
            this.hot.selection.setRangeEnd(new CellCoords(to.row, coords.col));
          } else {
            this.hot.selection.setRangeStartOnly(new CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
            this.hot.selection.setRangeEnd(new CellCoords(to.row, lastColIndex > to.col ? lastColIndex : to.col));
          }
        }
        if (from.col < to.col) {
          this.hot.selection.setRangeStartOnly(new CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
          this.hot.selection.setRangeEnd(new CellCoords(to.row, lastColIndex));

        }
        if (from.col > to.col) {
          this.hot.selection.setRangeStartOnly(new CellCoords(from.row, from.col));
          this.hot.selection.setRangeEnd(new CellCoords(to.row, coords.col));
        }
      }
    }
  }
github Graphite-Docs / graphite / node_modules / handsontable-pro / commonjs / plugins / nestedHeaders / nestedHeaders.js View on Github external
value: function onAfterOnCellMouseDown(event, coords, TD) {
      if (coords.row < 0) {
        var colspan = this.getColspan(coords.row, coords.col);
        var lastColIndex = coords.col + colspan - 1;

        if (colspan > 1) {
          var lastRowIndex = this.hot.countRows() - 1;
          this.hot.selection.setRangeEnd(new _src.CellCoords(lastRowIndex, lastColIndex));
        }
      }
    }
github Graphite-Docs / graphite / node_modules / handsontable-pro / commonjs / plugins / nestedHeaders / nestedHeaders.js View on Github external
if (from.col === to.col) {
            if (lastColIndex <= from.col && coords.col < from.col) {
              this.hot.selection.setRangeStartOnly(new _src.CellCoords(from.row, to.col));
              this.hot.selection.setRangeEnd(new _src.CellCoords(to.row, coords.col));
            } else {
              this.hot.selection.setRangeStartOnly(new _src.CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
              this.hot.selection.setRangeEnd(new _src.CellCoords(to.row, lastColIndex > to.col ? lastColIndex : to.col));
            }
          }
          if (from.col < to.col) {
            this.hot.selection.setRangeStartOnly(new _src.CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
            this.hot.selection.setRangeEnd(new _src.CellCoords(to.row, lastColIndex));
          }
          if (from.col > to.col) {
            this.hot.selection.setRangeStartOnly(new _src.CellCoords(from.row, from.col));
            this.hot.selection.setRangeEnd(new _src.CellCoords(to.row, coords.col));
          }
        }
      }
    }
github Graphite-Docs / graphite / node_modules / handsontable-pro / src / plugins / nestedHeaders / nestedHeaders.js View on Github external
onAfterOnCellMouseDown(event, coords, TD) {
    if (coords.row < 0) {
      let colspan = this.getColspan(coords.row, coords.col);
      let lastColIndex = coords.col + colspan - 1;

      if (colspan > 1) {
        let lastRowIndex = this.hot.countRows() - 1;
        this.hot.selection.setRangeEnd(new CellCoords(lastRowIndex, lastColIndex));
      }
    }
  }
github Graphite-Docs / graphite / node_modules / handsontable-pro / src / plugins / nestedHeaders / nestedHeaders.js View on Github external
}

      if (changeDirection) {
        [from.col, to.col] = [to.col, from.col];
      }

      if (colspan > 1) {
        blockCalculations.column = true;
        blockCalculations.cell = true;

        this.hot.selection.setSelectedHeaders(false, true);

        if (from.col === to.col) {
          if (lastColIndex <= from.col && coords.col < from.col) {
            this.hot.selection.setRangeStartOnly(new CellCoords(from.row, to.col));
            this.hot.selection.setRangeEnd(new CellCoords(to.row, coords.col));
          } else {
            this.hot.selection.setRangeStartOnly(new CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
            this.hot.selection.setRangeEnd(new CellCoords(to.row, lastColIndex > to.col ? lastColIndex : to.col));
          }
        }
        if (from.col < to.col) {
          this.hot.selection.setRangeStartOnly(new CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
          this.hot.selection.setRangeEnd(new CellCoords(to.row, lastColIndex));

        }
        if (from.col > to.col) {
          this.hot.selection.setRangeStartOnly(new CellCoords(from.row, from.col));
          this.hot.selection.setRangeEnd(new CellCoords(to.row, coords.col));
        }
      }
    }
github Graphite-Docs / graphite / node_modules / handsontable-pro / es / plugins / nestedHeaders / nestedHeaders.js View on Github external
if (changeDirection) {
          var _ref = [to.col, from.col];
          from.col = _ref[0];
          to.col = _ref[1];
        }

        if (colspan > 1) {
          blockCalculations.column = true;
          blockCalculations.cell = true;

          this.hot.selection.setSelectedHeaders(false, true);

          if (from.col === to.col) {
            if (lastColIndex <= from.col && coords.col < from.col) {
              this.hot.selection.setRangeStartOnly(new CellCoords(from.row, to.col));
              this.hot.selection.setRangeEnd(new CellCoords(to.row, coords.col));
            } else {
              this.hot.selection.setRangeStartOnly(new CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
              this.hot.selection.setRangeEnd(new CellCoords(to.row, lastColIndex > to.col ? lastColIndex : to.col));
            }
          }
          if (from.col < to.col) {
            this.hot.selection.setRangeStartOnly(new CellCoords(from.row, coords.col < from.col ? coords.col : from.col));
            this.hot.selection.setRangeEnd(new CellCoords(to.row, lastColIndex));
          }
          if (from.col > to.col) {
            this.hot.selection.setRangeStartOnly(new CellCoords(from.row, from.col));
            this.hot.selection.setRangeEnd(new CellCoords(to.row, coords.col));
          }
        }
      }
    }