(order, pos)
| 7290 | } |
| 7291 | var bidiOther; |
| 7292 | function getBidiPartAt(order, pos) { |
| 7293 | bidiOther = null; |
| 7294 | for (var i = 0, found; i < order.length; ++i) { |
| 7295 | var cur = order[i]; |
| 7296 | if (cur.from < pos && cur.to > pos) return i; |
| 7297 | if ((cur.from == pos || cur.to == pos)) { |
| 7298 | if (found == null) { |
| 7299 | found = i; |
| 7300 | } else if (compareBidiLevel(order, cur.level, order[found].level)) { |
| 7301 | if (cur.from != cur.to) bidiOther = found; |
| 7302 | return i; |
| 7303 | } else { |
| 7304 | if (cur.from != cur.to) bidiOther = i; |
| 7305 | return found; |
| 7306 | } |
| 7307 | } |
| 7308 | } |
| 7309 | return found; |
| 7310 | } |
| 7311 | |
| 7312 | function moveInLine(line, pos, dir, byUnit) { |
| 7313 | if (!byUnit) return pos + dir; |
no test coverage detected
searching dependent graphs…