moosetechnology / Moose

MOOSE - Platform for software and data analysis.
https://moosetechnology.github.io/moose-wiki
MIT License
136 stars 34 forks source link

RTLegendBuilder onDemand doesn't popup in html #1292

Closed bergel closed 6 years ago

bergel commented 6 years ago

Just wanted to report that when I add a legend to RTView, it works as expected when I ispect the view. When I export it to HTML, it shows the node, but neither mouse clicking nor hovering bring up the popup.

akevalion commented 6 years ago

I have updated roassal in order to use events in fixed shapes for roassal2 Please try with the next piece of code

    |  lb b |
    b := RTMondrian new.
    b shape rectangle
        width: [ :c | c numberOfVariables * 5 ];
        height: #numberOfMethods.
    b nodes: RTShape withAllSubclasses.
    b edges connectFrom: #superclass.
    b layout tree.
    b normalizer
        normalizeColor: #numberOfLinesOfCode using: (Array with: Color black with: Color red).
    b build.

    lb := RTLegendBuilder new.
    lb onDemand: '+Info'.
    lb view: b view.

    lb addText: 'System complexity view'.
    lb addRectanglePolymetricWidth: 'number of methods' height: 'Line of code' box: 'a Pharo class'.
    lb build.

    ^ b view

The html result should be like this

captura de pantalla 2018-04-12 a la s 05 12 11
bergel commented 6 years ago

Works well! Thanks!