X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ftableresize%2Fplugin.js;h=a28ab12360c602bab2d1a0850b3e54f2d7f4ee2d;hb=2f22c0c38f17e75be5541089076885442aaa2377;hp=23c19d60cebddd6403a34d3bdf22337da23eb2b2;hpb=039a051ccf3901311661022a30afd60fc38130c9;p=ckeditor.git diff --git a/_source/plugins/tableresize/plugin.js b/_source/plugins/tableresize/plugin.js index 23c19d6..a28ab12 100644 --- a/_source/plugins/tableresize/plugin.js +++ b/_source/plugins/tableresize/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -82,7 +82,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license pillarIndex += td.$.colSpan || 1; // Calculate the pillar boundary positions. - var pillarLeft, pillarRight, pillarWidth, pillarPadding; + var pillarLeft, pillarRight, pillarWidth; var x = td.getDocumentPosition().x; @@ -112,9 +112,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license pillarWidth = Math.max( pillarRight - pillarLeft, 3 ); - // Make the pillar touch area at least 14 pixels wide, for easy to use. - pillarPadding = Math.max( Math.round( 7 - ( pillarWidth / 2 ) ), 0 ); - // The pillar should reflects exactly the shape of the hovered // column border line. pillars.push( { @@ -123,8 +120,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license x : pillarLeft, y : tbodyPosition.y, width : pillarWidth, - height: tbody.$.offsetHeight, - padding : pillarPadding, + height : tbody.$.offsetHeight, rtl : rtl } ); } @@ -135,10 +131,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { for ( var i = 0, len = pillars.length ; i < len ; i++ ) { - var pillar = pillars[ i ], - pad = pillar.padding; + var pillar = pillars[ i ]; - if ( positionX >= pillar.x - pad && positionX <= ( pillar.x + pillar.width + pad ) ) + if ( positionX >= pillar.x && positionX <= ( pillar.x + pillar.width ) ) return pillar; } @@ -298,7 +293,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license document = editor.document; resizer = CKEDITOR.dom.element.createFromHtml( - '
', document ); @@ -349,9 +344,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( !pillar ) return 0; - var pad = pillar.padding; - - if ( !isResizing && ( posX < pillar.x - pad || posX > ( pillar.x + pillar.width + pad ) ) ) + if ( !isResizing && ( posX < pillar.x || posX > ( pillar.x + pillar.width ) ) ) { detach(); return 0;