Skip to content

Commit

Permalink
using jquery 1.7, latest jquery ui, and fixed dragging bug (issue 1168)
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Nov 20, 2011
1 parent 477c296 commit 56ae9f1
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 165 deletions.
16 changes: 0 additions & 16 deletions lib/jquery-1.5.2.min.js

This file was deleted.

4 changes: 4 additions & 0 deletions lib/jquery-1.7.min.js

Large diffs are not rendered by default.

147 changes: 0 additions & 147 deletions lib/jquery-ui-1.8.11.custom.min.js

This file was deleted.

150 changes: 150 additions & 0 deletions lib/jquery-ui-1.8.16.custom.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/_loader.js
@@ -1,7 +1,7 @@
(function() {

var JQUERY = 'jquery-1.5.2.min.js';
var JQUERY_UI = 'jquery-ui-1.8.11.custom.min.js';
var JQUERY = 'jquery-1.7.min.js';
var JQUERY_UI = 'jquery-ui-1.8.16.custom.min.js';
var JQUERY_LEGACY = 'jquery-1.3.2.min.js';
var JQUERY_UI_LEGACY = 'jquery-ui-1.7.3.custom.min.js';

Expand Down
9 changes: 9 additions & 0 deletions src/common/HoverListener.js
Expand Up @@ -20,6 +20,7 @@ function HoverListener(coordinateGrid) {


function mouse(ev) {
_fixUIEvent(ev);
var newCell = coordinateGrid.cell(ev.pageX, ev.pageY);
if (!newCell != !cell || newCell && (newCell.row != cell.row || newCell.col != cell.col)) {
if (newCell) {
Expand All @@ -42,3 +43,11 @@ function HoverListener(coordinateGrid) {


}


function _fixUIEvent(event) { // jQuery 1.7 workaround (for issue 1168)
if (event.pageX === undefined) {
event.pageX = event.originalEvent.pageX;
event.pageY = event.originalEvent.pageY;
}
}

0 comments on commit 56ae9f1

Please sign in to comment.