Good point! Revised: handleTwinChange = function(obj) {
_.find(state.Twins.twins,function(lhs,rhs){
var twin;
if(obj.id === lhs){
twin = getObj('graphic',rhs);
} else if(obj.id === rhs) {
twin = getObj('graphic',lhs);
}
if(twin) {
twin.set(_.reduce(props,function(m,p){
m[p]=obj.get(p);
return m;
},{}));
// mirroring
let page=getObj('page',twin.get('pageid'));
if(page){
let width=parseInt(page.get('width'),10)*70;
twin.set({
left: (width-twin.get('left')),
lastmove: _.map(
obj.get('lastmove').split(/,/),
(n,idx)=>(idx%2 ? n : width - parseInt(n,10) )
).join(',')
});
}
return true;
}
return false;
});
},
That should make the path mirrored as well...