+ [task#129807] add isSameLine function for think3c widget.
This commit is contained in:
@@ -200,6 +200,21 @@ function calculateCardPosition(region, index)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断在同一行。
|
||||
* Judge on the same line.
|
||||
*
|
||||
* @param array currentItem
|
||||
* @param array nextItem
|
||||
* @param number offset
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
function isSameLine(currentItem, nextItem, offset)
|
||||
{
|
||||
return currentItem[1] == nextItem[1] || Math.abs(currentItem[1] - nextItem[1]) < offset;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取最大左侧坐标和最小右侧坐标。
|
||||
* Get maxLeft and minRight.
|
||||
|
||||
Reference in New Issue
Block a user