소스 검색

Update example in mapViewPositionInsideInlineElement() docs.

Maciej Gołaszewski 6 년 전
부모
커밋
8724b745bb
1개의 변경된 파일16개의 추가작업 그리고 6개의 파일을 삭제
  1. 16 6
      packages/ckeditor5-engine/src/conversion/mapper-helpers.js

+ 16 - 6
packages/ckeditor5-engine/src/conversion/mapper-helpers.js

@@ -20,15 +20,25 @@
  *
  * 1. When selection starts before inline widget (offset=0):
  *
- *		+- anchor                +- focus (mapped)
- *		|                        |
- *		<p>f[oo <span class="widget">]widget</span></p>        map to:        <paragraph>f[oo <inline-widget></inline-widget>]</paragraph>
+ *		                             +- view position
+ *		                             |
+ *		<p>f[oo <span class="widget">]widget</span></p>
+ *
+ *		// will map to:
+ *		                                               +- model position
+ *		                                               |
+ *		<paragraph>f[oo <inline-widget></inline-widget>]</paragraph>
  *
  * 2. When selection start before inline widget (offset=0):
  *
- *		+- focus (mapped)        +- anchor
- *		|                        |
- *		<p><span class="widget">widget[</span> ba]r</p>        map to:        <paragraph>[<inline-widget></inline-widget> ba]r</paragraph>
+ *		                              +- view position
+ *		                              |
+ *		<p><span class="widget">widget[</span> ba]r</p>
+ *
+ *		// will map to:
+ *		           +- model position
+ *		           |
+ *		<paragraph>[<inline-widget></inline-widget> ba]r</paragraph>
  *
  * @param {module:engine/model/model~Model} model
  * @return {Function}