Skip to content

Commit

Permalink
Add build files (auto-generated)
Browse files Browse the repository at this point in the history
Fixes #302
  • Loading branch information
ipeychev committed Jul 27, 2015
1 parent ba45a6f commit 9c3d609
Show file tree
Hide file tree
Showing 10 changed files with 210 additions and 112 deletions.
7 changes: 4 additions & 3 deletions api/classes/CKEDITOR.plugins.selectionregion.html
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ <h4>Returns:</h4>
</ul>
</li>
</ul>
<p>If there is no native selection, the objects will be filled with 0.</p>

</div>
</div>
Expand Down Expand Up @@ -588,7 +589,7 @@ <h4>Returns:</h4>

<div class="returns-description">
<span class="type">Object</span>:
<p>Returns object with the following data:</p>
<p>Returns an object with the following data:</p>
<ul>
<li>element - The currently selected element, if any</li>
<li>text - The selected text</li>
Expand Down Expand Up @@ -617,7 +618,7 @@ <h3 class="name"><code>getSelectionDirection</code></h3>
<div class="meta">
<p>
Defined in
<a href="../files/src_core_selection-region.js.html#l301"><code>src&#x2F;core&#x2F;selection-region.js:301</code></a>
<a href="../files/src_core_selection-region.js.html#l319"><code>src&#x2F;core&#x2F;selection-region.js:319</code></a>
</p>


Expand Down Expand Up @@ -720,7 +721,7 @@ <h3 class="name"><code>init</code></h3>
<div class="meta">
<p>
Defined in
<a href="../files/src_core_selection-region.js.html#l332"><code>src&#x2F;core&#x2F;selection-region.js:332</code></a>
<a href="../files/src_core_selection-region.js.html#l353"><code>src&#x2F;core&#x2F;selection-region.js:353</code></a>
</p>


Expand Down
55 changes: 38 additions & 17 deletions api/files/src_core_selection-region.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ <h1><small>File</small> <code>src/core/selection-region.js</code></h1>
* Returns data for the current selection.
*
* @method getSelectionData
* @return {Object} Returns object with the following data:
* @return {Object} Returns an object with the following data:
* - element - The currently selected element, if any
* - text - The selected text
* - region - The data, returned from {{#crossLink &quot;CKEDITOR.plugins.selectionregion/getSelectionRegion:method&quot;}}{{/crossLink}}
Expand Down Expand Up @@ -382,28 +382,48 @@ <h1><small>File</small> <code>src/core/selection-region.js</code></h1>
* + right - right offset of the selection
* + top - top offset of the selection
* + width - the width of the rectangle
*
* If there is no native selection, the objects will be filled with 0.
*/
getClientRectsRegion: function() {
var selection = this.getSelection();
var nativeSelection = selection.getNative();

var rangeCount;
var clientRects;
var defaultRect = {
bottom: 0,
height: 0,
left: 0,
right: 0,
top: 0,
width: 0
};

if (nativeSelection.createRange) {
var range = nativeSelection.createRange();
clientRects = range.getClientRects();
} else {
rangeCount = nativeSelection.rangeCount;
clientRects = (nativeSelection.rangeCount &gt; 0) ? nativeSelection.getRangeAt(0).getClientRects() : [];
var region = {
bottom: 0,
endRect: defaultRect,
left: 0,
right: 0,
top: 0,
startRect: defaultRect
};

if (!nativeSelection) {
return region;
}

var bottom = 0;
var clientRects;
var left = Infinity;
var rangeCount;
var right = -Infinity;
var top = Infinity;

var region;
if (nativeSelection.createRange) {
clientRects = nativeSelection.createRange().getClientRects();
} else {
rangeCount = nativeSelection.rangeCount;
clientRects = (nativeSelection.rangeCount &gt; 0) ? nativeSelection.getRangeAt(0).getClientRects() : [];
}

if (clientRects.length === 0) {
region = this.getCaretRegion();
Expand All @@ -430,12 +450,10 @@ <h1><small>File</small> <code>src/core/selection-region.js</code></h1>

var scrollPos = new CKEDITOR.dom.window(window).getScrollPosition();

region = {
bottom: scrollPos.y + bottom,
left: scrollPos.x + left,
right: scrollPos.x + right,
top: scrollPos.y + top
};
region.bottom = scrollPos.y + bottom;
region.left = scrollPos.x + left;
region.right = scrollPos.x + right;
region.top = scrollPos.y + top;

if (clientRects.length) {
var endRect = clientRects[clientRects.length - 1];
Expand Down Expand Up @@ -474,10 +492,13 @@ <h1><small>File</small> <code>src/core/selection-region.js</code></h1>
* - CKEDITOR.SELECTION_BOTTOM_TO_TOP;
*/
getSelectionDirection: function() {
var direction = CKEDITOR.SELECTION_TOP_TO_BOTTOM;
var selection = this.getSelection();
var nativeSelection = selection.getNative();

var direction = CKEDITOR.SELECTION_TOP_TO_BOTTOM;
if (!nativeSelection) {
return direction;
}

var anchorNode;

Expand Down
10 changes: 4 additions & 6 deletions dist/alloy-editor/alloy-editor-all-min.js

Large diffs are not rendered by default.

55 changes: 38 additions & 17 deletions dist/alloy-editor/alloy-editor-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -20620,7 +20620,7 @@ CKEDITOR.disableAutoInline = true;
* Returns data for the current selection.
*
* @method getSelectionData
* @return {Object} Returns object with the following data:
* @return {Object} Returns an object with the following data:
* - element - The currently selected element, if any
* - text - The selected text
* - region - The data, returned from {{#crossLink "CKEDITOR.plugins.selectionregion/getSelectionRegion:method"}}{{/crossLink}}
Expand Down Expand Up @@ -20699,28 +20699,48 @@ CKEDITOR.disableAutoInline = true;
* + right - right offset of the selection
* + top - top offset of the selection
* + width - the width of the rectangle
*
* If there is no native selection, the objects will be filled with 0.
*/
getClientRectsRegion: function getClientRectsRegion() {
var selection = this.getSelection();
var nativeSelection = selection.getNative();

var rangeCount;
var clientRects;
var defaultRect = {
bottom: 0,
height: 0,
left: 0,
right: 0,
top: 0,
width: 0
};

if (nativeSelection.createRange) {
var range = nativeSelection.createRange();
clientRects = range.getClientRects();
} else {
rangeCount = nativeSelection.rangeCount;
clientRects = nativeSelection.rangeCount > 0 ? nativeSelection.getRangeAt(0).getClientRects() : [];
var region = {
bottom: 0,
endRect: defaultRect,
left: 0,
right: 0,
top: 0,
startRect: defaultRect
};

if (!nativeSelection) {
return region;
}

var bottom = 0;
var clientRects;
var left = Infinity;
var rangeCount;
var right = -Infinity;
var top = Infinity;

var region;
if (nativeSelection.createRange) {
clientRects = nativeSelection.createRange().getClientRects();
} else {
rangeCount = nativeSelection.rangeCount;
clientRects = nativeSelection.rangeCount > 0 ? nativeSelection.getRangeAt(0).getClientRects() : [];
}

if (clientRects.length === 0) {
region = this.getCaretRegion();
Expand All @@ -20747,12 +20767,10 @@ CKEDITOR.disableAutoInline = true;

var scrollPos = new CKEDITOR.dom.window(window).getScrollPosition();

region = {
bottom: scrollPos.y + bottom,
left: scrollPos.x + left,
right: scrollPos.x + right,
top: scrollPos.y + top
};
region.bottom = scrollPos.y + bottom;
region.left = scrollPos.x + left;
region.right = scrollPos.x + right;
region.top = scrollPos.y + top;

if (clientRects.length) {
var endRect = clientRects[clientRects.length - 1];
Expand Down Expand Up @@ -20791,10 +20809,13 @@ CKEDITOR.disableAutoInline = true;
* - CKEDITOR.SELECTION_BOTTOM_TO_TOP;
*/
getSelectionDirection: function getSelectionDirection() {
var direction = CKEDITOR.SELECTION_TOP_TO_BOTTOM;
var selection = this.getSelection();
var nativeSelection = selection.getNative();

var direction = CKEDITOR.SELECTION_TOP_TO_BOTTOM;
if (!nativeSelection) {
return direction;
}

var anchorNode;

Expand Down
10 changes: 4 additions & 6 deletions dist/alloy-editor/alloy-editor-core-min.js

Large diffs are not rendered by default.

55 changes: 38 additions & 17 deletions dist/alloy-editor/alloy-editor-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ CKEDITOR.disableAutoInline = true;
* Returns data for the current selection.
*
* @method getSelectionData
* @return {Object} Returns object with the following data:
* @return {Object} Returns an object with the following data:
* - element - The currently selected element, if any
* - text - The selected text
* - region - The data, returned from {{#crossLink "CKEDITOR.plugins.selectionregion/getSelectionRegion:method"}}{{/crossLink}}
Expand Down Expand Up @@ -435,28 +435,48 @@ CKEDITOR.disableAutoInline = true;
* + right - right offset of the selection
* + top - top offset of the selection
* + width - the width of the rectangle
*
* If there is no native selection, the objects will be filled with 0.
*/
getClientRectsRegion: function getClientRectsRegion() {
var selection = this.getSelection();
var nativeSelection = selection.getNative();

var rangeCount;
var clientRects;
var defaultRect = {
bottom: 0,
height: 0,
left: 0,
right: 0,
top: 0,
width: 0
};

if (nativeSelection.createRange) {
var range = nativeSelection.createRange();
clientRects = range.getClientRects();
} else {
rangeCount = nativeSelection.rangeCount;
clientRects = nativeSelection.rangeCount > 0 ? nativeSelection.getRangeAt(0).getClientRects() : [];
var region = {
bottom: 0,
endRect: defaultRect,
left: 0,
right: 0,
top: 0,
startRect: defaultRect
};

if (!nativeSelection) {
return region;
}

var bottom = 0;
var clientRects;
var left = Infinity;
var rangeCount;
var right = -Infinity;
var top = Infinity;

var region;
if (nativeSelection.createRange) {
clientRects = nativeSelection.createRange().getClientRects();
} else {
rangeCount = nativeSelection.rangeCount;
clientRects = nativeSelection.rangeCount > 0 ? nativeSelection.getRangeAt(0).getClientRects() : [];
}

if (clientRects.length === 0) {
region = this.getCaretRegion();
Expand All @@ -483,12 +503,10 @@ CKEDITOR.disableAutoInline = true;

var scrollPos = new CKEDITOR.dom.window(window).getScrollPosition();

region = {
bottom: scrollPos.y + bottom,
left: scrollPos.x + left,
right: scrollPos.x + right,
top: scrollPos.y + top
};
region.bottom = scrollPos.y + bottom;
region.left = scrollPos.x + left;
region.right = scrollPos.x + right;
region.top = scrollPos.y + top;

if (clientRects.length) {
var endRect = clientRects[clientRects.length - 1];
Expand Down Expand Up @@ -527,10 +545,13 @@ CKEDITOR.disableAutoInline = true;
* - CKEDITOR.SELECTION_BOTTOM_TO_TOP;
*/
getSelectionDirection: function getSelectionDirection() {
var direction = CKEDITOR.SELECTION_TOP_TO_BOTTOM;
var selection = this.getSelection();
var nativeSelection = selection.getNative();

var direction = CKEDITOR.SELECTION_TOP_TO_BOTTOM;
if (!nativeSelection) {
return direction;
}

var anchorNode;

Expand Down
10 changes: 4 additions & 6 deletions dist/alloy-editor/alloy-editor-no-ckeditor-min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 9c3d609

Please sign in to comment.