use themed map markers

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

View file

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