2 Replies Latest reply on Aug 2, 2017 4:34 PM by jaragon RSS
    jaragon Newbie

    Reset model properties with a button that is binded to sliders

    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;

    };