20
Views
3
Comments
Solved
[ZTree Reactive] ZTree Reactive change size of '+'/'-' symbol
ztree-reactive
Reactive icon
Forge asset by Pedro Neto
Application Type
Reactive

Hi all

I'm using Ztree in my app and I need to increase size of '+'/'-' symbol, I've tried to change CSS or resize the image of Ztree but it's not work.

Do you have any idea to change size of it?

I'm using demo app of Ztree to testing, I attached the OML as below, could you please help me check it

zTreeReactiveDemo.oml
2024-03-23 18-16-49
Bryan Villalobos
Solution

Hi @Bella Nguyen ,

Ztree seems to be using image sprite and just showing portions of the image via css.

So enlarging a particular icon will require to enlarge the whole sprite image and requires repositioning. I did some adjustments and placed it in the screen css. I only target the classes for -/+.

.ztree li span.button.roots_open {

    background-size: 320px 194px;

    background-position: -192px -46px;

}

.ztree li span.button.roots_close {

    background-size: 320px 194px;

    background-position: -156px -46px;

}

.ztree li span.button.center_open {

    background-size: 320px 194px;

    background-position: -192px -46px;

}

.ztree li span.button.center_close {

    background-size: 320px 194px;

    background-position: -156px -46px;

}

.ztree li span.button.bottom_open {

    background-size: 320px 194px;

    background-position: -192px -46px;

}

.ztree li span.button.bottom_close {

    background-size: 320px 194px;

    background-position: -156px -46px;

}




Regards,


Bryan

UserImage.jpg
Bella Nguyen

Hi Bryan, thank you for your solution, it solved my issue now.

UserImage.jpg
Bella Nguyen

Hi Bryan,

Can you tell me how to find the CSS number in your CSS? I change the px but UI not working. How can you calculation it?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.