Wondered if anyone know if this is possible?
Lets say I update an object type of state with this…
// update state
if (update_selected_state) {
instance.publishState('current_annotation', {
"_p_id": id,
"_p_name": "alpha",
"_p_comment": comment,
"_p_author": instance.data.annotation_1_author.trim()
});
}
And then later I decide I want to update it again, but ONLY one of those fields whilst keeping the other untouched. Can that be done?
I’ve tried a few ways and I thought sometime back I read somewhere that it could be done but it seems the whole object is required every time.
If I leave the ones I don’t want out of it entirely, like this:
// update state
if (update_selected_state) {
instance.publishState('current_annotation', {
"_p_comment": comment
});
}
It clears the state entirely, so figured I’d ask the question.
@bubble would you be able to find out?
Cheers
Paul