Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
feat(test): test feature, testing versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
rosspi committed May 21, 2017
1 parent c970cdb commit b142e16
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ notifications:
email: false
node_js:
- '7'
- '6'
- '4'
before_install:
- npm install -g grunt-cli
before_script:
Expand Down
24 changes: 22 additions & 2 deletions dist/jquery.gridstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,28 @@ var Methods = (function () {
this.internal.MoveCell(cellNIndex.$cell, $existingVisibleCells.eq(toIndex), targetGridstrap || context);
};

Methods.prototype.moveCellToCoordinates = function moveCellToCoordinates(selector, x, y, targetGridstrap) {
// TODO, use document.getlement at blah
Methods.prototype.$getCellFromCoordinates = function $getCellFromCoordinates(clientX, clientY) {
var document = this.setup.Document;
var $ = this.setup.jQuery;

var element = document.elementFromPoint(clientX, clientY);
var cellAndIndex = this.internal.GetCellAndInternalIndex(element);
if (!cellAndIndex) {
return $();
}
return cellAndIndex.$cell;
};

Methods.prototype.getCellIndexFromCoordinates = function getCellIndexFromCoordinates(clientX, clientY) {
var document = this.setup.Document;
var $ = this.setup.jQuery;

var element = document.elementFromPoint(clientX, clientY);
var cellAndIndex = this.internal.GetCellAndInternalIndex(element);
if (!cellAndIndex) {
return -1;
}
return this.$getCells().index(cellAndIndex.$cell);
};

Methods.prototype.$getCells = function $getCells() {
Expand Down
Loading

0 comments on commit b142e16

Please sign in to comment.