I looked at the code and changed my code locally and it seems to work better to get back to the default the user presses x
// called when a widgets properties are altered
this.widgetUpdated = function (widgetCtrl, currentProps, changedProps, oldProps) {
// automatically adjuts the Z distance of the button from the backplate
if(changedProps.radius) {
let newScale = 2 * changedProps.radius;
widgetCtrl.setProp('width', newScale.toFixed(4));
widgetCtrl.setProp('height', newScale.toFixed(4));
}
else if (changedProps.src == "") {
widgetCtrl.setProp('src', "resource/Extensions/src/phone/resources/../../extensions/images/pingerBlank.png");
}
};
return this;
}
I looked at the code and changed my code locally and it seems to work better to get back to the default the user presses x
// called when a widgets properties are altered
this.widgetUpdated = function (widgetCtrl, currentProps, changedProps, oldProps) {
// automatically adjuts the Z distance of the button from the backplate
if(changedProps.radius) {
let newScale = 2 * changedProps.radius;
widgetCtrl.setProp('width', newScale.toFixed(4));
widgetCtrl.setProp('height', newScale.toFixed(4));
}
else if (changedProps.src == "") {
widgetCtrl.setProp('src', "resource/Extensions/src/phone/resources/../../extensions/images/pingerBlank.png");
}
};
return this;
}