Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>/** * Splits this group into two groups based on the intersection of the group * with another group. The group is split in a direction to fill empty * cells left by the splitting group. * * @param onGroup * @param directionToMoveSplitCells * @return * */ public function split(onGroup:CellGroup, directionToMoveSplitCells:String):CellGroup { if(!hasIntersection(onGroup)) return this; var numCellsToSplit:int = 0; var splitCells:Array; var newGroup:CellGroup; var numberOfCellsToSplit:int; var splitStartIndex:int; var resultingGroupStartIndex:int; numberOfCellsToSplit = (directionToMoveSplitCells == "RIGHT" ? (endIndex - onGroup.startIndex) : (onGroup.endIndex - startIndex)) + 1; splitStartIndex = directionToMoveSplitCells == "RIGHT" ? (length - numberOfCellsToSplit) : 0; splitCells = trimCells(splitStartIndex, numberOfCellsToSplit); resultingGroupStartIndex = directionToMoveSplitCells == "RIGHT" ? (onGroup.startIndex - splitCells.length) : (onGroup.endIndex + 1); if (splitCells.length &gt; 0) { newGroup = row.createGroup(splitCells, resultingGroupStartIndex) newGroup.nextGroup = nextGroup; //not sure how to not set this from jump newGroup.previousGroup = previousGroup; //not sure how to not set this from jump if (newGroup.previousGroup){ newGroup.previousGroup.nextGroup = newGroup; previousGroup = newGroup; var newX:int = (onGroup.endIndex + 1) * cellSize.width; x = newX; } if (newGroup.nextGroup) newGroup.nextGroup.previousGroup = newGroup; else{ newGroup.nextGroup = this; newGroup.previousGroup = this; nextGroup = newGroup; } } removeArrayOfCellsFromGroup(splitCells); row.joinGroups(); row.updateGroupIndices(); repositionCellsInGroup(); return newGroup; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload