1 Reply Latest reply on Jul 11, 2017 12:44 PM by rabernathy RSS
    ckariappa Newbie

    Im trying to change the image(resource) of a 3D widget when a button is pressed. This is the code i've written. But it isnt working. What is the issue ?

    I'm trying to change the image(resource) of a 3D widget when a button is pressed. And then toggle it again. This is the code i've written.

     

    $scope.image = function() {

      if(a==true)

      {

        a= false;

         $scope.view.wdg['3DGauge-1']['src'] = Uploaded/dp.jpg ;

      }

      else

      {

        a= true;

         $scope.view.wdg['3DGauge-1']['src'] = Uploaded/IMG_20150701_072217.jpg ;

      }

    }

     

    Both the images are uploaded as resources to the project.

    But it isn't working. What is the issue ?