use themed map markers

This commit is contained in:
rolux 2012-12-28 18:00:34 +01:00
parent 8b8c40d32f
commit 21d6eec580

View file

@ -25,8 +25,9 @@ Ox.MapMarkerImage = (function() {
}, options); }, options);
var index = [ var index = [
options.type, options.mode, options.size, options.color.join(',') options.type, options.mode, options.size, options.color.join(',')
].join(';'); ].join(';'),
themeData = Ox.Theme.getThemeData();
if (!cache[index]) { if (!cache[index]) {
var color = options.rectangle ? [0, 0, 0, 0] var color = options.rectangle ? [0, 0, 0, 0]
@ -34,9 +35,9 @@ Ox.MapMarkerImage = (function() {
[options.type == 'place' ? 0.75 : 0.25] [options.type == 'place' ? 0.75 : 0.25]
), ),
border = ( border = (
options.mode == 'normal' ? [0, 0, 0] options.mode == 'normal' ? themeData.mapPlaceBorder
: options.mode == 'selected' ? [255, 255, 255] : options.mode == 'selected' ? themeData.mapPlaceSelectedBorder
: [128, 128, 255] : themeData.mapPlaceEditingBorder
).concat([options.type == 'result' ? 0.5 : 1]), ).concat([options.type == 'result' ? 0.5 : 1]),
c = Ox.canvas(options.size, options.size), c = Ox.canvas(options.size, options.size),
image, image,