Tip:
Flexigrid. Pack. js
$ ("Div: eq (" + R + ")", g.cdrag).css ({left :(! Browser. Mozilla? I-N: I) + "PX"}). Show ();
Change
$ ("Div: eq (" + R + ")", g.cdrag).css ({left: I + "PX"}). Show ();
Flexigrid. js
$ ('Div: eq ('+ N +') ', g.cdrag).css ({'left ':(! (Browser. Mozilla )? Cdpos-cdcounter: cdpos) + 'px '}). Show ();
Change
$ ('Div: eq ('+ N +') ', g.cdrag).css ({'left': cdpos + 'px'}). Show ();
Recently, flexigrid has been used in a project to display the entire row of data. However, in a write browser, it cannot properly overlap the drag lines and headers between columns.
The correct result should be
The actual effect is:
This problem is obviously caused by flexigrid itself. You can choose to drag a line in the (Google, Firefox, etc.) browser-> right-click to view the element
We can see that the drag line is placed in a div whose class is cdrag, so we can open flexigrid. js to view the Code related to cdrag.
There is such a piece of code
rePosDrag: function () { var cdleft = 0 - this.hDiv.scrollLeft; if (this.hDiv.scrollLeft > 0) cdleft -= Math.floor(p.cgwidth / 2); $(g.cDrag).css({ top: g.hDiv.offsetTop + 1 }); var cdpad = this.cdpad; var cdcounter=0; $(‘div‘, g.cDrag).hide(); $(‘thead tr:first th:visible‘, this.hDiv).each(function () { var n = $(‘thead tr:first th:visible‘, g.hDiv).index(this); var cdpos = parseInt($(‘div‘, this).width()); if (cdleft == 0) cdleft -= Math.floor(p.cgwidth / 2); cdpos = cdpos + cdleft + cdpad; if (isNaN(cdpos)) { cdpos = 0; } $(‘div:eq(‘ + n + ‘)‘, g.cDrag).css({ ‘left‘: (!(browser.mozilla) ? cdpos - cdcounter : cdpos) + ‘px‘ }).show(); cdleft = cdpos; cdcounter++; }); },
The blue part of the code is to determine whether the browser is a Firefox browser to set the line position. It is obvious that the problem is caused by changing it to the following code to solve the problem.
$(‘div:eq(‘ + n + ‘)‘, g.cDrag).css({‘left‘: cdpos + ‘px‘}).show();
I don't know why flexigrid wants to make such a judgment on the browser. It seems that the image is superfluous...
The dragging lines between flexigrid Columns cannot overlap with the column edge in Some browsers.