Skip to content

Commit d40bc01

Browse files
authored
Add CGFloat casts to fix visualize command
1 parent 08e52e5 commit d40bc01

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)