//-> actually we always lock 2 cursors at once so should never be only 1 locked, but just for safety..
this.unLockAllCursors();
List<InputCursor> availableCursors = getFreeComponentCursors();
if (availableCursors.size() >= 2){ //we can try to resume the gesture
InputCursor firstCursor = availableCursors.get(0);
InputCursor secondCursor = getFarthestFreeComponentCursorTo(firstCursor);
//See if we can obtain a lock on both cursors
IMTComponent3D comp = firstCursor.getFirstEvent().getTargetComponent();
ScaleContext newContext = new ScaleContext(firstCursor, secondCursor, comp);
if (!newContext.isGestureAborted()){ //Check if we could start gesture (ie. if fingers on component)
sc = newContext;
this.getLock(firstCursor, secondCursor);
logger.debug(this.getName() + " we could lock cursors: " + firstCursor.getId() +", " + secondCursor.getId());
}else{
sc = null;
logger.debug(this.getName() + " we could NOT resume gesture - cursors not on component: " + firstCursor.getId() +", " + secondCursor.getId());
}
}
}