Skip to main content
1-Visitor
Jan 15, 2018 12:29 PM UTC
Solved

Hide a model

Hello,

using Java to modify a Model ITEM is possible e.g. changing the color by using:

$scope.view.wdg['model-item1'].color = 'rgba(152,191,16, 1)'

Is it possible to change a COMPLETE model in the same way?

mwassmannAnswer
5-Regular Member
Jan 15, 2018 1:07 PM UTC

The model widget does not have a color attribute.

You could create a model-item with component occurence id / 

this would create a model item on top level.

Another solution could be to use a shader - in a tml widget, however this is a bit tricky.

Martin

3 replies

mwassmann5-Regular MemberAnswer
5-Regular Member
Jan 15, 2018 1:07 PM UTC

The model widget does not have a color attribute.

You could create a model-item with component occurence id / 

this would create a model item on top level.

Another solution could be to use a shader - in a tml widget, however this is a bit tricky.

Martin

Translate
Raphael081-VisitorAuthor
1-Visitor
Jan 16, 2018 7:59 AM UTC

Ok thanks.

Is there a possibility a "reset" the Color that has been set by Java without loading the experience new again?

$scope.view.wdg['modelItem-1'].color = 'rgba(152,191,16, 1)';

Translate
5-Regular Member
Jan 17, 2018 3:46 PM UTC

Very easy:

$scope.view.wdg['modelItem-1'].color = "";

--> however it works in view - not in the preview.

Translate