Select to view content in your preferred language

Bug in EditorSkin

796
1
01-25-2011 05:40 AM
EddieJesinsky
Deactivated User
Hi,

Just wanted to mention possible bugs/suggested changes relating to the EditorSkin (both the com.esri.ags version and the one provided with the api).

where you have
                                       if (polygonDrawTool == DrawTool.CIRCLE)
                                        {
                                            _arrayList.addItem(circleIcon);
                                        }
                                        if (polygonDrawTool == DrawTool.ELLIPSE)
                                        {
                                            _arrayList.addItem(circleIcon);
                                        }


it should be
                                       if (polygonDrawTool == DrawTool.CIRCLE)
                                        {
                                            _arrayList.addItem(circleIcon);
                                        }
                                        if (polygonDrawTool == DrawTool.ELLIPSE)
                                        {
                                            _arrayList.addItem(ellipseIcon);
                                        }


Due to this, whenever you set the editor.createOptions, you lose the ability to use the ellipse tool.

Also, this may be a misunderstanding on my part, but prior to switching to a modified skin, I was able to do something like

myEditor.templatePicker.setStyle("skinClass", MyTemplatePickerSkin);
myEditor.clearSelectionButton.setStyle("skinClass", EditorClearSelectionButtonSkin);
myEditor.deleteButton.setStyle("skinClass", EditorDeleteButtonSkin);


to modify the style of the editor, but using the provided skin like below removes the effect of the three lines following it.

myEditor.setStyle("skinClass", MyEditorSkin")
myEditor.templatePicker.setStyle("skinClass", MyTemplatePickerSkin);
myEditor.clearSelectionButton.setStyle("skinClass", EditorClearSelectionButtonSkin);
myEditor.deleteButton.setStyle("skinClass", EditorDeleteButtonSkin);


What is different about the com.esri.ags skin and the skin provided with the api? (I was able to correct this by setting the skin components directly in the MyEditorSkin- I also think the TemplatePicker should be provided a default skinClass)

Thanks
Tags (2)
0 Kudos
1 Reply
SarthakDatt
Frequent Contributor
Hey Eddie,

Thanks for reporting the bug. Would be fixed in the next version.

Regarding, setting the skin class on the components, have you tried using the inline styles instead of explicitly using the setStyle() method to see if that would help in your scenario.

Something like:

<fx:Style>
        @namespace s "library://ns.adobe.com/flex/spark";
        @namespace esri "http://www.esri.com/2008/ags";
        
        esri|Editor
        {
            skinClass : ClassReference("com.esri.ags.skins.YourEditorSkin");
        }
        
        esri|TemplatePicker
        {
            skinClass : ClassReference("com.esri.ags.skins.YourTemplatePickerSkin");
        }
        
</fx:Style>
0 Kudos