本文整理匯總了TypeScript中@ephox/agar.Log.chain方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Log.chain方法的具體用法?TypeScript Log.chain怎麽用?TypeScript Log.chain使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@ephox/agar.Log
的用法示例。
在下文中一共展示了Log.chain方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: cInsertTable
const cUnmergeCellsMeasureTableWidth = (label, data) => {
return Log.chain('TBA', 'Merge and unmerge cells, measure table widths', NamedChain.asChain(
[
NamedChain.direct(NamedChain.inputName(), Chain.identity, 'editor'),
Chain.label('Insert table', NamedChain.direct('editor', cInsertTable(label, data.html), 'element')),
Chain.label('Drag SE (-100, 0)', NamedChain.read('editor', TableTestUtils.cDragHandle('se', -100, 0))),
Chain.label('Store width before merge', NamedChain.write('widthBefore', TableTestUtils.cGetWidth)),
Chain.label('Merge table cells', NamedChain.read('editor', TableTestUtils.cMergeCells(data.select))),
Chain.label('Split table cells', NamedChain.read('editor', TableTestUtils.cSplitCells)),
Chain.label('Store width after merge/unmerge', NamedChain.write('widthAfter', TableTestUtils.cGetWidth)),
NamedChain.merge(['widthBefore', 'widthAfter'], 'widths'),
NamedChain.output('widths')
]
));
};
示例2: cInsertTable
const cInsertColumnMeasureWidth = (label, data) => {
return Log.chain('TBA', 'Insert column before, insert column after, erase column and measure table widths', NamedChain.asChain(
[
NamedChain.direct(NamedChain.inputName(), Chain.identity, 'editor'),
Chain.label('Insert table', NamedChain.direct('editor', cInsertTable(label, data.html), 'element')),
Chain.label('Drag SE (-100, 0)', NamedChain.read('editor', TableTestUtils.cDragHandle('se', -100, 0))),
Chain.label('Store width before split', NamedChain.write('widthBefore', TableTestUtils.cGetWidth)),
Chain.label('Insert column before', NamedChain.read('editor', TableTestUtils.cInsertColumnBefore)),
Chain.label('Insert column after', NamedChain.read('editor', TableTestUtils.cInsertColumnAfter)),
Chain.label('Delete column', NamedChain.read('editor', TableTestUtils.cDeleteColumn)),
Chain.label('Store width after split', NamedChain.write('widthAfter', TableTestUtils.cGetWidth)),
NamedChain.merge(['widthBefore', 'widthAfter'], 'widths'),
NamedChain.output('widths')
]
));
};