JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6.1
[ckeditor.git] / _source / plugins / tableresize / plugin.js
index f16978a..891a7d9 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -82,7 +82,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        pillarIndex += td.$.colSpan || 1;\r
 \r
                        // Calculate the pillar boundary positions.\r
-                       var pillarLeft, pillarRight, pillarWidth, pillarPadding;\r
+                       var pillarLeft, pillarRight, pillarWidth;\r
 \r
                        var x = td.getDocumentPosition().x;\r
 \r
@@ -112,9 +112,6 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 \r
                        pillarWidth = Math.max( pillarRight - pillarLeft, 3 );\r
 \r
-                       // Make the pillar touch area at least 14 pixels wide, for easy to use.\r
-                       pillarPadding = Math.max( Math.round( 7 - ( pillarWidth / 2 ) ), 0 );\r
-\r
                        // The pillar should reflects exactly the shape of the hovered\r
                        // column border line.\r
                        pillars.push( {\r
@@ -123,8 +120,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                x : pillarLeft,\r
                                y : tbodyPosition.y,\r
                                width : pillarWidth,\r
-                               height: tbody.$.offsetHeight,\r
-                               padding : pillarPadding,\r
+                               height : tbody.$.offsetHeight,\r
                                rtl : rtl } );\r
                }\r
 \r
@@ -135,10 +131,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
        {\r
                for ( var i = 0, len = pillars.length ; i < len ; i++ )\r
                {\r
-                       var pillar = pillars[ i ],\r
-                               pad = pillar.padding;\r
+                       var pillar = pillars[ i ];\r
 \r
-                       if ( positionX >= pillar.x - pad && positionX <= ( pillar.x + pillar.width + pad ) )\r
+                       if ( positionX >= pillar.x && positionX <= ( pillar.x + pillar.width ) )\r
                                return pillar;\r
                }\r
 \r
@@ -298,7 +293,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                document = editor.document;\r
 \r
                resizer = CKEDITOR.dom.element.createFromHtml(\r
-                       '<div cke_temp=1 contenteditable=false unselectable=on '+\r
+                       '<div data-cke-temp=1 contenteditable=false unselectable=on '+\r
                        'style="position:absolute;cursor:col-resize;filter:alpha(opacity=0);opacity:0;' +\r
                                'padding:0;background-color:#004;background-image:none;border:0px none;z-index:10"></div>', document );\r
 \r
@@ -349,9 +344,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                        if ( !pillar )\r
                                return 0;\r
 \r
-                       var pad = pillar.padding;\r
-\r
-                       if ( !isResizing && ( posX < pillar.x - pad || posX > ( pillar.x + pillar.width + pad ) ) )\r
+                       if ( !isResizing && ( posX < pillar.x || posX > ( pillar.x + pillar.width ) ) )\r
                        {\r
                                detach();\r
                                return 0;\r
@@ -393,7 +386,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                return;\r
                }\r
 \r
-               target.getAscendant( 'table', true ).removeCustomData( '_cke_table_pillars' );\r
+               target.getAscendant( 'table', 1 ).removeCustomData( '_cke_table_pillars' );\r
                evt.removeListener();\r
        }\r
 \r
@@ -423,10 +416,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
                                                        table,\r
                                                        pillars;\r
 \r
-                                               if ( !target.is( 'table' ) && !target.getAscendant( 'tbody', true ) )\r
+                                               if ( !target.is( 'table' ) && !target.getAscendant( 'tbody', 1 ) )\r
                                                        return;\r
 \r
-                                               table = target.getAscendant( 'table', true );\r
+                                               table = target.getAscendant( 'table', 1 );\r
 \r
                                                if ( !( pillars = table.getCustomData( '_cke_table_pillars' ) ) )\r
                                                {\r