I'm using the following API for the automatic marker in blooding condition. It works alright, but I'd like to change the "redmarker" for the "half-heart", but the dash symbol in the name of the marker creates an error. Anyone can help me solving this? on("change:graphic:bar1_value", function(obj) {
if(obj.get("bar1_max") === "") return;
if(obj.get("bar1_value") <= obj.get("bar1_max") / 2) {
obj.set({
status_redmarker: true
});
}
else{
obj.set({
status_redmarker: false
});
}
if(obj.get("bar1_value") <= 0) {
obj.set({
status_dead: true
});
}
else {
obj.set({
status_dead: false
});
}
}); Felipe Lima