Преглед изворни кода

Align code to the changes in conversion helpers API.

Maciej Gołaszewski пре 7 година
родитељ
комит
8e73f37e70
2 измењених фајлова са 13 додато и 13 уклоњено
  1. 10 10
      packages/ckeditor5-widget/src/highlightstack.js
  2. 3 3
      packages/ckeditor5-widget/src/utils.js

+ 10 - 10
packages/ckeditor5-widget/src/highlightstack.js

@@ -17,7 +17,7 @@ import mix from '@ckeditor/ckeditor5-utils/src/mix';
  *
  *
  * * highlight with highest priority should be applied,
  * * highlight with highest priority should be applied,
  * * if two highlights have same priority - sort by CSS class provided in
  * * if two highlights have same priority - sort by CSS class provided in
- * {@link module:engine/conversion/downcast-converters~HighlightDescriptor}.
+ * {@link module:engine/conversion/downcasthelpers~HighlightDescriptor}.
  *
  *
  * This way, highlight will be applied with the same rules it is applied on texts.
  * This way, highlight will be applied with the same rules it is applied on texts.
  */
  */
@@ -33,7 +33,7 @@ export default class HighlightStack {
 	 * Adds highlight descriptor to the stack.
 	 * Adds highlight descriptor to the stack.
 	 *
 	 *
 	 * @fires change:top
 	 * @fires change:top
-	 * @param {module:engine/conversion/downcast-converters~HighlightDescriptor} descriptor
+	 * @param {module:engine/conversion/downcasthelpers~HighlightDescriptor} descriptor
 	 * @param {module:engine/view/downcastwriter~DowncastWriter} writer
 	 * @param {module:engine/view/downcastwriter~DowncastWriter} writer
 	 */
 	 */
 	add( descriptor, writer ) {
 	add( descriptor, writer ) {
@@ -83,7 +83,7 @@ export default class HighlightStack {
 	 * descriptor with same id is already present.
 	 * descriptor with same id is already present.
 	 *
 	 *
 	 * @private
 	 * @private
-	 * @param {module:engine/conversion/downcast-converters~HighlightDescriptor} descriptor
+	 * @param {module:engine/conversion/downcasthelpers~HighlightDescriptor} descriptor
 	 */
 	 */
 	_insertDescriptor( descriptor ) {
 	_insertDescriptor( descriptor ) {
 		const stack = this._stack;
 		const stack = this._stack;
@@ -131,8 +131,8 @@ mix( HighlightStack, EmitterMixin );
 
 
 // Compares two descriptors by checking their priority and class list.
 // Compares two descriptors by checking their priority and class list.
 //
 //
-// @param {module:engine/conversion/downcast-converters~HighlightDescriptor} a
-// @param {module:engine/conversion/downcast-converters~HighlightDescriptor} b
+// @param {module:engine/conversion/downcasthelpers~HighlightDescriptor} a
+// @param {module:engine/conversion/downcasthelpers~HighlightDescriptor} b
 // @returns {Boolean} Returns true if both descriptors are defined and have same priority and classes.
 // @returns {Boolean} Returns true if both descriptors are defined and have same priority and classes.
 function compareDescriptors( a, b ) {
 function compareDescriptors( a, b ) {
 	return a && b && a.priority == b.priority && classesToString( a.classes ) == classesToString( b.classes );
 	return a && b && a.priority == b.priority && classesToString( a.classes ) == classesToString( b.classes );
@@ -140,8 +140,8 @@ function compareDescriptors( a, b ) {
 
 
 // Checks whenever first descriptor should be placed in the stack before second one.
 // Checks whenever first descriptor should be placed in the stack before second one.
 //
 //
-// @param {module:engine/conversion/downcast-converters~HighlightDescriptor} a
-// @param {module:engine/conversion/downcast-converters~HighlightDescriptor} b
+// @param {module:engine/conversion/downcasthelpers~HighlightDescriptor} a
+// @param {module:engine/conversion/downcasthelpers~HighlightDescriptor} b
 // @returns {Boolean}
 // @returns {Boolean}
 function shouldABeBeforeB( a, b ) {
 function shouldABeBeforeB( a, b ) {
 	if ( a.priority > b.priority ) {
 	if ( a.priority > b.priority ) {
@@ -154,7 +154,7 @@ function shouldABeBeforeB( a, b ) {
 	return classesToString( a.classes ) > classesToString( b.classes );
 	return classesToString( a.classes ) > classesToString( b.classes );
 }
 }
 
 
-// Converts CSS classes passed with {@link module:engine/conversion/downcast-converters~HighlightDescriptor} to
+// Converts CSS classes passed with {@link module:engine/conversion/downcasthelpers~HighlightDescriptor} to
 // sorted string.
 // sorted string.
 //
 //
 // @param {String|Array<String>} descriptor
 // @param {String|Array<String>} descriptor
@@ -168,9 +168,9 @@ function classesToString( classes ) {
  *
  *
  * @event change:top
  * @event change:top
  * @param {Object} data Additional information about the change.
  * @param {Object} data Additional information about the change.
- * @param {module:engine/conversion/downcast-converters~HighlightDescriptor} [data.newDescriptor] New highlight
+ * @param {module:engine/conversion/downcasthelpers~HighlightDescriptor} [data.newDescriptor] New highlight
  * descriptor. It will be `undefined` when last descriptor is removed from the stack.
  * descriptor. It will be `undefined` when last descriptor is removed from the stack.
- * @param {module:engine/conversion/downcast-converters~HighlightDescriptor} [data.oldDescriptor] Old highlight
+ * @param {module:engine/conversion/downcasthelpers~HighlightDescriptor} [data.oldDescriptor] Old highlight
  * descriptor. It will be `undefined` when first descriptor is added to the stack.
  * descriptor. It will be `undefined` when first descriptor is added to the stack.
  * @param {module:engine/view/downcastwriter~DowncastWriter} writer View writer that can be used to modify element.
  * @param {module:engine/view/downcastwriter~DowncastWriter} writer View writer that can be used to modify element.
  */
  */

+ 3 - 3
packages/ckeditor5-widget/src/utils.js

@@ -55,8 +55,8 @@ export function isWidget( node ) {
  * * implements the {@link ~setHighlightHandling view highlight on widgets}.
  * * implements the {@link ~setHighlightHandling view highlight on widgets}.
  *
  *
  * This function needs to be used in conjunction with
  * This function needs to be used in conjunction with
- * {@link module:engine/conversion/downcast-converters~DowncastHelpers downcast conversion helpers}
- * like {@link module:engine/conversion/downcast-converters~DowncastHelpers#elementToElement `elementToElement()`}.
+ * {@link module:engine/conversion/downcasthelpers~DowncastHelpers downcast conversion helpers}
+ * like {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`}.
  * Moreover, typically you will want to use `toWidget()` only for `editingDowncast`, while keeping the `dataDowncast` clean.
  * Moreover, typically you will want to use `toWidget()` only for `editingDowncast`, while keeping the `dataDowncast` clean.
  *
  *
  * For example, in order to convert a `<widget>` model element to `<div class="widget">` in the view, you can define
  * For example, in order to convert a `<widget>` model element to `<div class="widget">` in the view, you can define
@@ -190,7 +190,7 @@ export function getLabel( element ) {
  * * adds the `ck-editor__nested-editable_focused` CSS class when the editable is focused and removes it when it is blurred.
  * * adds the `ck-editor__nested-editable_focused` CSS class when the editable is focused and removes it when it is blurred.
  *
  *
  * Similarly to {@link ~toWidget `toWidget()`} this function should be used in `dataDowncast` only and it is usually
  * Similarly to {@link ~toWidget `toWidget()`} this function should be used in `dataDowncast` only and it is usually
- * used together with {@link module:engine/conversion/downcast-converters~DowncastHelpers#elementToElement `elementToElement()`}.
+ * used together with {@link module:engine/conversion/downcasthelpers~DowncastHelpers#elementToElement `elementToElement()`}.
  *
  *
  * For example, in order to convert a `<nested>` model element to `<div class="nested">` in the view, you can define
  * For example, in order to convert a `<nested>` model element to `<div class="nested">` in the view, you can define
  * such converters:
  * such converters: