Skip to content

Commit

Permalink
Merge pull request #202 from facebook/visualize-casts
Browse files Browse the repository at this point in the history
Add CGFloat casts to fix visualize command
  • Loading branch information
kastiglione committed Oct 16, 2017
2 parents 08e52e5 + d40bc01 commit 08c9b83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/FBVisualizationCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def _showLayer(layer):
layer = '(' + layer + ')'
size = '((CGRect)[(id)' + layer + ' bounds]).size'

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

0 comments on commit 08c9b83

Please sign in to comment.