EDIT: the unselect command was introduced in PennController 1.6.
Thanks for posting a request here Leo,
As a workaround, you can add this at the top of your script to add the command unselect (will only work with getScale
—not with newScale
):
var oldGetScale = getScale;
getScale = name => {
let t = oldGetScale(name);
t.unselect = ()=>{
let e = t._element;
t._promises.push(()=>new Promise(resolve=>{
if (e.scaleType == "buttons")
e.table.find("td.PennController-"+e.type+"-scaleButton").css("outline","");
else if (e.scaleType == "slider"){
let r = e.table.find("input[type=range]")[0];
r.value = (r.max - r.min) / 2;
}
else
e.table.find(".PennController-"+e.type+"-scaleButton input[type=radio]").removeAttr("checked");
resolve();
}));
return t;
};
return t;
};
Jeremy
-
This reply was modified 4 years, 10 months ago by Jeremy. Reason: Command added to PennController 1.6