Skip to content

Commit 08c9b83

Browse files
authored
Merge pull request #202 from facebook/visualize-casts
Add CGFloat casts to fix visualize command
2 parents 08e52e5 + d40bc01 commit 08c9b83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

commands/FBVisualizationCommands.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ def _showLayer(layer):
100100
layer = '(' + layer + ')'
101101
size = '((CGRect)[(id)' + layer + ' bounds]).size'
102102

103-
width = float(fb.evaluateExpression(size + '.width'))
104-
height = float(fb.evaluateExpression(size + '.height'))
103+
width = float(fb.evaluateExpression('(CGFloat)(' + size + '.width)'))
104+
height = float(fb.evaluateExpression('(CGFloat)(' + size + '.height)'))
105105
if width == 0.0 or height == 0.0:
106106
print 'Nothing to see here - the size of this element is {} x {}.'.format(width, height)
107107
return

0 commit comments

Comments
 (0)