Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
I have this on my Home.js and a button with the script resetButton(); It works fine, but only one time after that the button has no effect.
$scope.changeColor1 = function()
{
$scope.app.params.Color = 'rgba(255,255,255,1);';
};
$scope.changeColor2 = function()
{
$scope.app.params.Color = 'rgba(17,193,243,1);';
};
$scope.changeColor3 = function()
{
$scope.app.params.Color = 'rgba(51,205,95,1);';
};
$scope.changeColor4 = function()
{
$scope.app.params.Color = 'rgba(255,201,0,1);';
};
$scope.changeColor5 = function()
{
$scope.app.params.Color = 'rgba(0,0,0,1);';
};
$scope.resetButton = function()
{
$scope.app.params.Scale = 1.0;
$scope.app.params.SliderX = 0;
$scope.app.params.SliderZ = 0;
};
Hi Jose;
With the piece of code you gave i don't see any fault. Let me know the application scenario and how you are implementing it in thingworx.
the app has a model and 3 sliders that control the scale, x-axis rotation and z-axis rotation. I also created 3 application parameters (Scale, SliderX,SliderZ) each of them binded to their respective slider. at the same time each slider is binded to their respective model item property.
Thanks.