123456789101112131415161718192021222324252627282930 |
- 'use strict';
- /**
- * Licensed Materials - Property of IBM
- * IBM Cognos Products: BI Cloud (C) Copyright IBM Corp. 2015, 2017
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- define(['../../../../lib/@waca/core-client/js/core-client/ui/core/Class', './NormalizedRange'], function (Class, NormalizedRange) {
- /**
- * Represents a selection from the document model, but with normalized positions within its ranges
- */
- var NormalizedSelection = Class.extend({
- /**
- * @param {Selection} selection from document.getSelection()
- */
- init: function init(selection) {
- this.original = selection;
- this.isCursor = selection.isCollapsed;
- this.ranges = [];
- for (var i = 0; i < selection.rangeCount; i++) {
- this.ranges.push(new NormalizedRange(selection.getRangeAt(i)));
- }
- }
- });
- return NormalizedSelection;
- });
- //# sourceMappingURL=NormalizedSelection.js.map
|