omorandi / TiViewShadow

A Titanium Mobile module for adding drop shadow features to every View you create
MIT License
67 stars 21 forks source link

Border Radius ignored #7

Closed iantearle closed 12 years ago

iantearle commented 12 years ago

Border radius appears to be ignored when adding a shadow to a view.

I am trying to get circular images with a shadow behind, but it appears to be a square shadow: http://cl.ly/GGvA

                var photoView = Ti.UI.createView({
                    backgroundColor: '#FFFFFF',
                    borderColor: '#FFFFFF',
                    borderWidth: 2, 
                    borderRadius: 20,
                    top:10, bottom:0, left:10,
                    height:40,
                    width:40
                });
                photoView.add(photo);

                tableViewDataItem.add(new ui.View({
                    backgroundColor: '#FFFFFF',
                    borderColor: '#FFFFFF',
                    borderWidth: 2, 
                    borderRadius: 20,
                    shadow:{
                        shadowRadius:2,
                        shadowOpacity:0.3,
                        shadowOffset:{x:0, y:1}
                    },
                    top:10, bottom:0, left:10,
                    height:40,
                    width:40                    
                }));

This is SDK 2.0 / iOS 5.1 / Version 0.3

omorandi commented 12 years ago

I've just committed a possible fix for this and updated the module version to 0.4. Please check it out. Here's a preview of the result: https://skitch.com/omorandi/8akh8/ios-simulator

iantearle commented 12 years ago

Works a treat. Wonderful.