@@ 1864-1881 (lines=18) @@ | ||
1861 | ||
1862 | first = (ts || bs || ls || rs); |
|
1863 | ||
1864 | if(o.snapMode !== "outer") { |
|
1865 | ts = Math.abs(t - y1) <= d; |
|
1866 | bs = Math.abs(b - y2) <= d; |
|
1867 | ls = Math.abs(l - x1) <= d; |
|
1868 | rs = Math.abs(r - x2) <= d; |
|
1869 | if(ts) { |
|
1870 | ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top; |
|
1871 | } |
|
1872 | if(bs) { |
|
1873 | ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top; |
|
1874 | } |
|
1875 | if(ls) { |
|
1876 | ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left; |
|
1877 | } |
|
1878 | if(rs) { |
|
1879 | ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left; |
|
1880 | } |
|
1881 | } |
|
1882 | ||
1883 | if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) { |
|
1884 | (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); |
|
@@ 1843-1860 (lines=18) @@ | ||
1840 | continue; |
|
1841 | } |
|
1842 | ||
1843 | if(o.snapMode !== "inner") { |
|
1844 | ts = Math.abs(t - y2) <= d; |
|
1845 | bs = Math.abs(b - y1) <= d; |
|
1846 | ls = Math.abs(l - x2) <= d; |
|
1847 | rs = Math.abs(r - x1) <= d; |
|
1848 | if(ts) { |
|
1849 | ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top; |
|
1850 | } |
|
1851 | if(bs) { |
|
1852 | ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top; |
|
1853 | } |
|
1854 | if(ls) { |
|
1855 | ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left; |
|
1856 | } |
|
1857 | if(rs) { |
|
1858 | ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left; |
|
1859 | } |
|
1860 | } |
|
1861 | ||
1862 | first = (ts || bs || ls || rs); |
|
1863 |