| @@ 2373-2388 (lines=16) @@ | ||
| 2370 | return customUiContainer && !isFixed(ctrl) ? getUiContainerViewPort(customUiContainer) : getWindowViewPort(); |
|
| 2371 | }; |
|
| 2372 | var Movable = { |
|
| 2373 | testMoveRel: function (elm, rels) { |
|
| 2374 | var viewPortRect = getViewPortRect(this); |
|
| 2375 | for (var i = 0; i < rels.length; i++) { |
|
| 2376 | var pos = calculateRelativePosition(this, elm, rels[i]); |
|
| 2377 | if (isFixed(this)) { |
|
| 2378 | if (pos.x > 0 && pos.x + pos.w < viewPortRect.w && pos.y > 0 && pos.y + pos.h < viewPortRect.h) { |
|
| 2379 | return rels[i]; |
|
| 2380 | } |
|
| 2381 | } else { |
|
| 2382 | if (pos.x > viewPortRect.x && pos.x + pos.w < viewPortRect.w + viewPortRect.x && pos.y > viewPortRect.y && pos.y + pos.h < viewPortRect.h + viewPortRect.y) { |
|
| 2383 | return rels[i]; |
|
| 2384 | } |
|
| 2385 | } |
|
| 2386 | } |
|
| 2387 | return rels[0]; |
|
| 2388 | }, |
|
| 2389 | moveRel: function (elm, rel) { |
|
| 2390 | if (typeof rel !== 'string') { |
|
| 2391 | rel = this.testMoveRel(elm, rel); |
|
| @@ 1357-1372 (lines=16) @@ | ||
| 1354 | return customUiContainer && !isFixed(ctrl) ? getUiContainerViewPort(customUiContainer) : getWindowViewPort(); |
|
| 1355 | }; |
|
| 1356 | var Movable = { |
|
| 1357 | testMoveRel: function (elm, rels) { |
|
| 1358 | var viewPortRect = getViewPortRect(this); |
|
| 1359 | for (var i = 0; i < rels.length; i++) { |
|
| 1360 | var pos = calculateRelativePosition(this, elm, rels[i]); |
|
| 1361 | if (isFixed(this)) { |
|
| 1362 | if (pos.x > 0 && pos.x + pos.w < viewPortRect.w && pos.y > 0 && pos.y + pos.h < viewPortRect.h) { |
|
| 1363 | return rels[i]; |
|
| 1364 | } |
|
| 1365 | } else { |
|
| 1366 | if (pos.x > viewPortRect.x && pos.x + pos.w < viewPortRect.w + viewPortRect.x && pos.y > viewPortRect.y && pos.y + pos.h < viewPortRect.h + viewPortRect.y) { |
|
| 1367 | return rels[i]; |
|
| 1368 | } |
|
| 1369 | } |
|
| 1370 | } |
|
| 1371 | return rels[0]; |
|
| 1372 | }, |
|
| 1373 | moveRel: function (elm, rel) { |
|
| 1374 | if (typeof rel !== 'string') { |
|
| 1375 | rel = this.testMoveRel(elm, rel); |
|