Generate test for border (and fix gentest to include border offset)
Summary: Generate tests for border. This required modifying gentest to add the parent clientLeft and clientTop so that border width are accounted for in output. Reviewed By: lucasr Differential Revision: D3791286 fbshipit-source-id: 698cc2332a3f4118e1afdfbfd745ba824e8ec3f4
This commit is contained in:
committed by
Facebook Github Bot 2
parent
251a499ba6
commit
d9191431ff
@@ -346,8 +346,8 @@ function calculateTree(root) {
|
||||
var child = root.children[i];
|
||||
rootLayout.push({
|
||||
name: child.id !== '' ? child.id : 'INSERT_NAME_HERE',
|
||||
left: child.offsetLeft,
|
||||
top: child.offsetTop,
|
||||
left: child.offsetLeft + child.parentNode.clientLeft,
|
||||
top: child.offsetTop + child.parentNode.clientTop,
|
||||
width: child.offsetWidth,
|
||||
height: child.offsetHeight,
|
||||
children: calculateTree(child),
|
||||
|
Reference in New Issue
Block a user