Index: trunk/parsers/wikidom/lib/synth/views/es.SurfaceView.js |
— | — | @@ -213,6 +213,7 @@ |
214 | 214 | } |
215 | 215 | } |
216 | 216 | this.mouse.selecting = false; |
| 217 | + stopScrolling(); |
217 | 218 | }; |
218 | 219 | |
219 | 220 | es.SurfaceView.prototype.onCut = function( e ) { |
Index: trunk/parsers/wikidom/lib/synth/views/es.DocumentView.js |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | ? $target : $target.closest( '.editSurface-block' ), |
64 | 64 | position = es.Position.newFromEventPagePosition( e ); |
65 | 65 | |
66 | | - if( $block.length ) { |
| 66 | + if( false && $block.length ) { |
67 | 67 | var block = $block.data( 'block' ), |
68 | 68 | offset = block.getOffsetFromPosition( position ); |
69 | 69 | while ( typeof block.list !== 'undefined' ) { |
— | — | @@ -71,6 +71,15 @@ |
72 | 72 | } |
73 | 73 | return offset; |
74 | 74 | } else { |
| 75 | + //console.log(position.top); |
| 76 | + |
| 77 | + if (position.top - $(window).scrollTop() > window.innerHeight) { |
| 78 | + console.log("b " + position.top); |
| 79 | + position.top = window.innerHeight + $(window).scrollTop() + 10; |
| 80 | + console.log("j " + position.top); |
| 81 | + } |
| 82 | + |
| 83 | + |
75 | 84 | return this.getOffsetFromPosition( position ); |
76 | 85 | } |
77 | 86 | }; |
— | — | @@ -86,7 +95,15 @@ |
87 | 96 | if ( this.items.length === 0 ) { |
88 | 97 | return 0; |
89 | 98 | } |
| 99 | + |
| 100 | + if (position.top - $(window).scrollTop() > window.innerHeight) { |
| 101 | + console.log("b " + position.top); |
| 102 | + position.top = window.innerHeight + $(window).scrollTop() + 10; |
| 103 | + position.left = window.innerWidth; |
| 104 | + console.log("j " + position.top); |
| 105 | + } |
90 | 106 | |
| 107 | + |
91 | 108 | var blockView = this.items[0]; |
92 | 109 | |
93 | 110 | for ( var i = 1; i < this.items.length; i++ ) { |