import DragingSelection from "./DragingSelection"; class TokensSelection { beginIndex: number; endIndex: number; constructor(beginIndex: number, endIndex: number) { this.beginIndex = beginIndex; this.endIndex = endIndex; } static fromDragingSelection(draging: DragingSelection):TokensSelection { if(draging.anchor1<=draging.anchor2) { return new TokensSelection(draging.anchor1, draging.anchor2+1); } else { return new TokensSelection(draging.anchor2, draging.anchor1+1); } } } export default TokensSelection;