The row header width auto-fit feature works like this:
1. It will extend the width beyond the initial width if needed. It starts from rowHeaderWidth - the new width is never smaller.
2. It stores the updated value back to rowHeaderWidth property.
See also:
http://doc.daypilot.org/scheduler/row-header-width-auto-fit/
There might become more configurable in the future but at this moment the solution is to reset the width to a small value before calling .update():
// ...
$("#gantt").click(function(){
if (dps.viewType == "Gantt"){
dps.viewType = "Resources";
} else {
dps.viewType = "Gantt";
}
dps.rowHeaderWidth = 20;
dps.update();
});
See the updated jsfiddle:
http://jsfiddle.net/Yja42/3/