NorthwoodsSoftware/GoJS

Custom Background or css

Closed this issue · 1 comments

Hello,

I have a problem. I am waiting for your help.

I have passive members in the tree structure. I want to change their background or lower their opacity level.

image

For example, the marked user's data has "status":"passive"

The full data is as follows

{ "class": "go.TreeModel",
"nodeDataArray": [{"key":0,"name":"RandomName611","title":"asdasdqqq","dept":90001993,"pic":"1.jpg","email":"email","phone":"phone","left_id":90008549,"right_id":90001078,"status":"active"},{"key":90008549,"name":"RandomName436","title":"asdasd","dept":90008549,"pic":"1.jpg","email":"email","phone":"phone","parent":0,"status":"active"},{"key":90021545,"name":"RandomName737","title":"asdasd","dept":90021545,"pic":"1.jpg","email":"email","phone":"phone","parent":90008549,"status":"passive"},{"key":90021369,"name":"RandomName364","title":"asdasd","dept":90021369,"pic":"1.jpg","email":"email","phone":"phone","parent":90021545,"status":"active"},{"key":90021521,"name":"RandomName132","title":"asdasd","dept":90021521,"pic":"1.jpg","email":"email","phone":"phone","parent":90008549,"status":"active"},{"key":90001078,"name":"RandomName387","title":"asdasd","dept":90001078,"pic":"1.jpg","email":"email","phone":"phone","parent":0,"status":"active"},{"key":90001879,"name":"RandomName573","title":"asdasd","dept":90001879,"pic":"1.jpg","email":"email","phone":"phone","parent":90001078,"status":"active"},{"key":90001911,"name":"RandomName241","title":"asdasd","dept":90001911,"pic":"1.jpg","email":"email","phone":"phone","parent":90001879,"status":"active"},{"key":90002219,"name":"RandomName106","title":"asdasd","dept":90002219,"pic":"1.jpg","email":"email","phone":"phone","parent":90001911,"status":"active"},{"key":90002437,"name":"RandomName926","title":"asdasd","dept":90002437,"pic":"1.jpg","email":"email","phone":"phone","parent":90002219,"status":"active"},{"key":90003733,"name":"RandomName439","title":"asdasd","dept":90003733,"pic":"1.jpg","email":"email","phone":"phone","parent":90002437,"status":"active"},{"key":90001945,"name":"RandomName732","title":"asdasd","dept":90001945,"pic":"1.jpg","email":"email","phone":"phone","parent":90001911,"status":"active"},{"key":90002620,"name":"RandomName787","title":"asdasd","dept":90002620,"pic":"1.jpg","email":"email","phone":"phone","parent":90001945,"status":"active"},{"key":90001918,"name":"RandomName386","title":"asdasd","dept":90001918,"pic":"1.jpg","email":"email","phone":"phone","parent":90001078,"status":"active"},{"key":90001914,"name":"RandomName539","title":"asdasd","dept":90001914,"pic":"1.jpg","email":"email","phone":"phone","parent":90001918,"status":"active"},{"key":90002198,"name":"RandomName715","title":"asdasd","dept":90002198,"pic":"1.jpg","email":"email","phone":"phone","parent":90001914,"status":"active"},{"key":90001946,"name":"RandomName114","title":"asdasd","dept":90001946,"pic":"1.jpg","email":"email","phone":"phone","parent":90001914,"status":"active"},{"key":90002416,"name":"RandomName702","title":"asdasd","dept":90002416,"pic":"1.jpg","email":"email","phone":"phone","parent":90001946,"status":"active"},{"key":90002349,"name":"RandomName430","title":"asdasd","dept":90002349,"pic":"1.jpg","email":"email","phone":"phone","parent":90002416,"status":"active"},{"key":90024748,"name":"RandomName815","title":"asdasd","dept":90024748,"pic":"1.jpg","email":"email","phone":"phone","parent":90002349,"status":"active"},{"key":1720282848,"name":"RandomName480","title":"asdasd","dept":"\u00dcye Se\u00e7","pic":"uyesec","email":"uyesec","phone":"uyesec","parent":90021369,"status":"active"},{"key":1720282848,"name":"RandomName561","title":"asdasd","dept":"\u00dcye Se\u00e7","pic":"uyesec","email":"uyesec","phone":"uyesec","parent":90024748,"status":"active"}]
}

GitHub issues are just for bug reports about the library. Questions belong in the forum.

But to answer your question anyway: use a data Binding. https://gojs.net/latest/intro/dataBinding.html