2019-04-04 11:49:55 +03:00
|
|
|
/* exported LuacontrollerOverlay */
|
|
|
|
/* globals AbstractIconOverlay: true */
|
2019-02-08 12:07:59 +03:00
|
|
|
|
|
|
|
var LuacontrollerIcon = L.icon({
|
|
|
|
iconUrl: 'pics/jeija_luacontroller_top.png',
|
|
|
|
|
2019-02-15 16:45:35 +03:00
|
|
|
iconSize: [16, 16],
|
2019-02-08 12:07:59 +03:00
|
|
|
iconAnchor: [8, 8],
|
|
|
|
popupAnchor: [0, -16]
|
|
|
|
});
|
|
|
|
|
2019-02-15 16:43:07 +03:00
|
|
|
var LuacontrollerBurntIcon = L.icon({
|
|
|
|
iconUrl: 'pics/jeija_luacontroller_burnt_top.png',
|
|
|
|
|
2019-02-15 16:45:35 +03:00
|
|
|
iconSize: [16, 16],
|
2019-02-15 16:43:07 +03:00
|
|
|
iconAnchor: [8, 8],
|
|
|
|
popupAnchor: [0, -16]
|
|
|
|
});
|
|
|
|
|
2019-02-08 12:07:59 +03:00
|
|
|
var LuacontrollerOverlay = AbstractIconOverlay.extend({
|
|
|
|
initialize: function(wsChannel, layerMgr) {
|
2019-02-15 16:43:07 +03:00
|
|
|
AbstractIconOverlay.prototype.initialize.call(this, wsChannel, layerMgr, "luacontroller");
|
|
|
|
},
|
|
|
|
|
|
|
|
getIcon: function(ctrl){
|
2019-06-11 14:30:36 +03:00
|
|
|
if (ctrl.attributes.burnt)
|
2019-02-15 16:43:07 +03:00
|
|
|
return LuacontrollerBurntIcon;
|
2019-02-15 19:53:32 +03:00
|
|
|
else
|
|
|
|
return LuacontrollerIcon;
|
2019-02-08 12:07:59 +03:00
|
|
|
},
|
|
|
|
|
2019-02-15 16:43:07 +03:00
|
|
|
createPopup: function(ctrl){
|
2019-06-11 14:30:36 +03:00
|
|
|
return "LuaController" + (ctrl.attributes.burnt ? "(Burnt)" : "");
|
2019-02-08 12:07:59 +03:00
|
|
|
}
|
|
|
|
});
|