Created
December 2, 2013 18:15
-
-
Save loiane/7753833 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.define('MyApp.view.WorldMap', { | |
extend: 'Ext.draw.Component', | |
alias: 'widget.worldmap', | |
gradients :[{ | |
id: 'gradientId', | |
angle: 45, | |
stops: { | |
0: { | |
color: '#fdf0be' | |
}, | |
1: { | |
color: '#f9da5c' | |
} | |
} | |
}], | |
initComponent: function() { | |
var me = this; | |
var items = []; | |
for (var country in worldmap.shapes) { | |
Ext.Array.push(items,{ | |
type: 'path', | |
stroke: '#fef7de', | |
fill: 'url(#gradientId)', | |
'stroke-opacity': 0.25, | |
path: worldmap.shapes[country], | |
itemId: country | |
}); | |
} | |
Ext.apply(me,{ | |
items:items | |
}); | |
me.callParent(arguments); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment