cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

how to bind button with opacity?

SOLVED
Regular Member

how to bind button with opacity?

How to bind button in such a way that when i click button the opacity of model will change to one?(Initially i set opacity to zero)

1 ACCEPTED SOLUTION

Accepted Solutions

Re: how to bind button with opacity?

Hi @gfiore 

thank for your concern ... I have followed same steps but after clicking in preview it is not showing the model with opacity 1 

View solution in original post

4 REPLIES 4

Re: how to bind button with opacity?

hi,

 

you can use this code Javascript:

 

 

$scope.opacity=function(status) {
$scope.view.wdg['IdObject']['opacity'] = status;
};

 

idObject as the id of the widget .

status is the value of opacity.

 

example :

if your widget has an id called    test   :

$scope.opacity=function(status) {
$scope.view.wdg['test']['opacity'] = status;
};

 

if you want  opacity 0 

call    into  event of button    :    opacity(0)

 

if you want  opacity 1

call    into  event of button     :   opacity(1)

 

 

I hope to be proved helpful.

Giuseppe

 

Re: how to bind button with opacity?

Hi @gfiore 

thank for your concern ... I have followed same steps but after clicking in preview it is not showing the model with opacity 1 

View solution in original post

Re: how to bind button with opacity?

 

you have wrong into the code...

 

change 

 $scope.view.wdg['test']['opacity'] = status;

 

with

 $scope.view.wdg['model-1']['opacity'] = status;

 

🙂

Bye

Giuseppe

 

 

 

Re: how to bind button with opacity?

thank you so much @gfiore