The dragging lines between flexigrid Columns cannot overlap with the column edge in Some browsers.

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.