mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-29 06:57:03 +00:00
Another try at fixing issue #782
This commit is contained in:
committed by
Ross Boucher
parent
cea663f4eb
commit
fc51bead8e
@@ -71,6 +71,8 @@ var LEFT_SHADOW_INSET = 3.0,
|
||||
|
||||
CGRect _imageRect;
|
||||
CPImageAlignment _imageAlignment;
|
||||
|
||||
CPImage _emptyImage;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CGRect)aFrame
|
||||
@@ -95,6 +97,10 @@ var LEFT_SHADOW_INSET = 3.0,
|
||||
|
||||
_DOMImageElement.style.visibility = "hidden";
|
||||
#endif
|
||||
|
||||
var bundle = [CPBundle bundleForClass:[CPView class]];
|
||||
|
||||
_emptyImage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"empty.png"]];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -131,7 +137,7 @@ var LEFT_SHADOW_INSET = 3.0,
|
||||
var newImage = [self objectValue];
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
_DOMImageElement.src = newImage ? [newImage filename] : "";
|
||||
_DOMImageElement.src = newImage ? [newImage filename] : [_emptyImage filename];
|
||||
#endif
|
||||
|
||||
var size = [newImage size];
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 110 B |
Reference in New Issue
Block a user