X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Ftableresize%2Fplugin.js;h=891a7d97e5b4cf4602dc4724d2eaa27b960057ea;hb=f0610347140239143439a511ee2bd48cb784f470;hp=f16978a9de1d330708e279ef3a2b438b7b4eecb1;hpb=e371ddf8abcb89013e20e6d0dd746adec344d0e5;p=ckeditor.git diff --git a/_source/plugins/tableresize/plugin.js b/_source/plugins/tableresize/plugin.js index f16978a..891a7d9 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-2011, 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; @@ -393,7 +386,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license return; } - target.getAscendant( 'table', true ).removeCustomData( '_cke_table_pillars' ); + target.getAscendant( 'table', 1 ).removeCustomData( '_cke_table_pillars' ); evt.removeListener(); } @@ -423,10 +416,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license table, pillars; - if ( !target.is( 'table' ) && !target.getAscendant( 'tbody', true ) ) + if ( !target.is( 'table' ) && !target.getAscendant( 'tbody', 1 ) ) return; - table = target.getAscendant( 'table', true ); + table = target.getAscendant( 'table', 1 ); if ( !( pillars = table.getCustomData( '_cke_table_pillars' ) ) ) {