• johndos

    (@johndos)


    Hey mate is it possible to add an icon next to the node so that people know if it is a node or a link? for example an arrow

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter johndos

    (@johndos)

    I mean a clickable arrow.

    Thread Starter johndos

    (@johndos)

    ok I have the fix. First create the image you want to act as an arrow or dot or what ever, add it in the image folder of the plugin. then edit the css and replace these lines

    ul.mtree.default li.mtree-open:before {
      content: '-';
    }
    ul.mtree.default li.mtree-closed:before {
      content: '+';
    }

    with the following lines of code (where left.svg and down.svg are the image names of your own).

    ul.mtree.default li.mtree-closed {
     display: block;
        background: url("../images/arrow-left.svg") no-repeat center center;
        background-size:17px 17px;
    	background-position:right;
    }
    
    ul.mtree.default li.mtree-open {
     display: block ;
        background: url("../images/arrow-down.svg") no-repeat center center;
        background-size: 15px 15px;
    	background-position:top 9px right;
    }
    Thread Starter johndos

    (@johndos)

    just a little edit, the code should be like this in order not to have issues with the div when changing pages.

    ul.mtree.default li.mtree-closed {
     display: block;
        background: url("../images/arrow-left.svg") no-repeat center center;
        background-size:17px 17px;
    	background-position:top 9px right;
    }
    
    ul.mtree.default li.mtree-open {
     display: block ;
        background: url("../images/arrow-down.svg") no-repeat center center;
        background-size: 15px 15px;
    	background-position:top 9px right;
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘icon next to node’ is closed to new replies.