From 1e6595fca7ac7c686d52fc47dbdc73939dfa056a Mon Sep 17 00:00:00 2001 From: Ross Boucher Date: Thu, 10 Jun 2010 13:29:47 -0700 Subject: [PATCH] Slight switch statement change so that nil/0 are treated equivalently. --- AppKit/CPImageView.j | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/AppKit/CPImageView.j b/AppKit/CPImageView.j index ab9722cae..017b59ad3 100644 --- a/AppKit/CPImageView.j +++ b/AppKit/CPImageView.j @@ -368,10 +368,8 @@ var LEFT_SHADOW_INSET = 3.0, case CPImageAlignBottomRight: x = boundsWidth - width; break; - - case CPImageAlignCenter: - case CPImageAlignTop: - case CPImageAlignBottom: + + default: x = (boundsWidth - width) / 2.0; break; } @@ -389,10 +387,8 @@ var LEFT_SHADOW_INSET = 3.0, case CPImageAlignBottomRight: y = boundsHeight - height; break; - - case CPImageAlignLeft: - case CPImageAlignRight: - case CPImageAlignCenter: + + default: y = (boundsHeight - height) / 2.0; break; }