Skip to content

Commit

Permalink
Defect 14149: Column headers become misaligned with data if moving/dr…
Browse files Browse the repository at this point in the history
…agging a column into or within the area of locked columns

1 modify z-index from 1 to 0 in "claro\Cridx.css"
2  when dragging a column, if mouse over locked columns, change icon
from enable to disable
  • Loading branch information
yfruan committed Oct 30, 2015
1 parent c3ee3ba commit c270fb4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
31 changes: 30 additions & 1 deletion modules/dnd/Column.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ define([
"dojo/dom-geometry",
"dojo/dom-class",
"dojo/query",
"dojo/dnd/Manager",
"./_Base",
"../../core/_Module"
], function(declare, array, domGeometry, domClass, query, _Base, _Module){
], function(declare, array, domGeometry, domClass, query, DndManager, _Base, _Module){

/*=====
return declare(_Base, {
Expand Down Expand Up @@ -191,6 +192,34 @@ define([
}
return ret;
},

_onMouseMove: function(){
var t = this;
var flag = true;

if(t._target >= 0){

if (t.grid.columnLock && t._target < t.grid.columnLock.count) {
flag = false;
}

var indexes = array.map(t._selectedColIds, function(colId){
return t.grid._columnsById[colId].index;
});

if (t.grid.columnLock) {
if (array.some(indexes, function(index) {
return index < t.grid.columnLock.count;
})) {
console.warn('can not move locked columns');
flag = false;
}
}
}
var manager=DndManager.manager();
manager.canDropFlag = flag;
manager.avatar.update();
},

_onDropInternal: function(nodes, copy){
var t = this;
Expand Down
2 changes: 2 additions & 0 deletions modules/dnd/_Dnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ define([
var t = this;
if(t._alreadyIn && (t._dnding || t._extDnding)){
t._markTargetAnchor(evt);
if(this.profile._onMouseMove)
this.profile._onMouseMove();
}
},

Expand Down
2 changes: 1 addition & 1 deletion resources/claro/Gridx.css

Large diffs are not rendered by default.

0 comments on commit c270fb4

Please sign in to comment.