Index: trunk/parsers/wikidom/lib/hype/bases/es.DocumentViewLeafNode.js |
— | — | @@ -67,7 +67,12 @@ |
68 | 68 | * @returns {es.Position} Position of offset |
69 | 69 | */ |
70 | 70 | es.DocumentViewLeafNode.prototype.getRenderedPositionFromOffset = function( offset ) { |
71 | | - return this.contentView.getRenderedPositionFromOffset( offset ); |
| 71 | + var position = this.contentView.getRenderedPositionFromOffset( offset ), |
| 72 | + offset = this.$content.offset(); |
| 73 | + position.top += offset.top; |
| 74 | + position.left += offset.left; |
| 75 | + position.bottom += offset.top; |
| 76 | + return position; |
72 | 77 | }; |
73 | 78 | |
74 | 79 | /** |
Index: trunk/parsers/wikidom/lib/hype/views/es.ParagraphView.js |
— | — | @@ -10,13 +10,4 @@ |
11 | 11 | var view = es.extendObject( new es.DocumentViewLeafNode( model ), this ); |
12 | 12 | view.$.addClass( 'editSurface-paragraphBlock' ); |
13 | 13 | return view; |
14 | | -}; |
15 | | - |
16 | | -es.ParagraphView.prototype.getRenderedPositionFromOffset = function( offset ) { |
17 | | - var position = this.contentView.getRenderedPositionFromOffset( offset ), |
18 | | - offset = this.$content.offset(); |
19 | | - position.top += offset.top; |
20 | | - position.left += offset.left; |
21 | | - position.bottom += offset.top; |
22 | | - return position; |
23 | | -}; |
| 14 | +}; |
\ No newline at end of file |
Index: trunk/parsers/wikidom/lib/hype/views/es.HeadingView.js |
— | — | @@ -10,13 +10,4 @@ |
11 | 11 | var view = es.extendObject( new es.DocumentViewLeafNode( model, $('<h' + model.getElementAttribute( 'level' ) +'/>') ), this ); |
12 | 12 | view.$.addClass( 'editSurface-headingBlock' ); |
13 | 13 | return view; |
14 | | -}; |
15 | | - |
16 | | -es.HeadingView.prototype.getRenderedPositionFromOffset = function( offset ) { |
17 | | - var position = this.contentView.getRenderedPositionFromOffset( offset ), |
18 | | - offset = this.$content.offset(); |
19 | | - position.top += offset.top; |
20 | | - position.left += offset.left; |
21 | | - position.bottom += offset.top; |
22 | | - return position; |
23 | 14 | }; |
\ No newline at end of file |