web/assets/libs/ckeditor/4.6.7/plugins/tableresize/plugin.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
( function() {
var pxUnit = CKEDITOR.tools.cssLength,
needsIEHacks = CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks );
function getWidth( el ) {
return CKEDITOR.env.ie ? el.$.clientWidth : parseInt( el.getComputedStyle( 'width' ), 10 );
}
function getBorderWidth( element, side ) {
var computed = element.getComputedStyle( 'border-' + side + '-width' ),
borderMap = {
thin: '0px',
medium: '1px',
thick: '2px'
};
if ( computed.indexOf( 'px' ) < 0 ) {
// look up keywords
if ( computed in borderMap && element.getComputedStyle( 'border-style' ) != 'none' )
computed = borderMap[ computed ];
else
computed = 0;
}
return parseInt( computed, 10 );
}
// Gets the table row that contains the most columns.
function getMasterPillarRow( table ) {
var $rows = table.$.rows,
maxCells = 0,
cellsCount, $elected, $tr;
for ( var i = 0, len = $rows.length; i < len; i++ ) {
$tr = $rows[ i ];
cellsCount = $tr.cells.length;
if ( cellsCount > maxCells ) {
maxCells = cellsCount;
$elected = $tr;
}
}
return $elected;
}
function buildTableColumnPillars( table ) {
var pillars = [],
pillarIndex = -1,
rtl = ( table.getComputedStyle( 'direction' ) == 'rtl' );
// Get the raw row element that cointains the most columns.
var $tr = getMasterPillarRow( table );
// Get the tbody element and position, which will be used to set the
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。