Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels shown outside container boxes #147

Closed
bijwaard opened this issue Apr 18, 2020 · 13 comments
Closed

Labels shown outside container boxes #147

bijwaard opened this issue Apr 18, 2020 · 13 comments

Comments

@bijwaard
Copy link

Hi Arnaud,

I recently get labels that are shown higher than in draw.io, see the picture below (flowcharting edit session below the flowcharting display). I noticed the coordinates of my chart started negative, so I moved the graphics down to make all coordinates positive. Unfortunately, this didn't make a difference. Note that placeholders are used for the the container and port labels. However, the port labels are displayed correctly.

Could this be a draw.io library issue? I see the same in flowcharting v0.8 and v0.7 snapshots.
image

Kind regards,
Dennis

@bijwaard
Copy link
Author

Hi Arnaud,
It looks like it mainly happens only when the overflow=fill; style is used. When I use align=center;verticalAlign=top it displays within the container in flowcharting (only a little lower than it did with overflow in draw.io).
Kind regards,
Dennis

@algenty
Copy link
Owner

algenty commented Apr 18, 2020

Hi
Can you give me an xml example ?
BR

@bijwaard
Copy link
Author

Hi Arnaud,
I took your example flow and modified it a bit with overflow=fill on most and verticalAlign=top on the influxdb shape.

`

<root>
    <mxCell id="0"/>
    <mxCell id="1" parent="0"/>
    <mxCell id="26" value="My label" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#808080;strokeWidth=5;shadow=1;labelBackgroundColor=#ffffff;fontColor=#000000;align=center;verticalAlign=top;" parent="1" vertex="1">
        <mxGeometry x="574.5" y="276" width="120" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="23" value="My label" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#808080;strokeWidth=5;shadow=1;overflow=fill;labelBackgroundColor=#ffffff;fontColor=#000000;" parent="1" vertex="1">
        <mxGeometry x="160" y="80" width="120" height="60" as="geometry"/>
    </mxCell>
    <mxCell id="24" value="My label" style="rhombus;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#808080;strokeWidth=5;shadow=1;fontSize=20;overflow=fill;fontColor=#FFFFFF;" parent="1" vertex="1">
        <mxGeometry x="392" y="160" width="138" height="110" as="geometry"/>
    </mxCell>
    <mxCell id="9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#808080;strokeWidth=5;shadow=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="27" target="24" edge="1">
        <mxGeometry relative="1" as="geometry">
            <mxPoint x="657" y="146" as="sourcePoint"/>
            <mxPoint x="540" y="219" as="targetPoint"/>
        </mxGeometry>
    </mxCell>
    <mxCell id="6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#808080;strokeWidth=5;shadow=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="23" edge="1">
        <mxGeometry relative="1" as="geometry">
            <mxPoint x="229" y="172" as="sourcePoint"/>
            <mxPoint x="270" y="256" as="targetPoint"/>
        </mxGeometry>
    </mxCell>
    <UserObject label="" link="https://jgraph.github.io/mxgraph/" tooltip="mxGraph is a JavaScript diagramming library that enables interactive graph and charting applications to be quickly created that run natively in any major browser that is supported by its vendor." id="6bAWTHbqWUbAYT8Wy3y0-2">
        <mxCell style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image=https://github.com/algenty/flowcharting-repository/blob/master/icons/mxgraph_logo.gif?raw=true;strokeWidth=5;strokeColor=#808080;" parent="1" vertex="1">
            <mxGeometry x="187" y="90" width="66" height="40" as="geometry"/>
        </mxCell>
    </UserObject>
    <UserObject label="" link="https://www.influxdata.com" tooltip="InfluxDB is a time series database designed to handle high write and query loads." id="6bAWTHbqWUbAYT8Wy3y0-12">
        <mxCell style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image=https://github.com/algenty/flowcharting-repository/blob/master/icons/influxdb.png?raw=true;strokeWidth=5;strokeColor=#808080;" parent="1" vertex="1">
            <mxGeometry x="572.5" y="283" width="124" height="46" as="geometry"/>
        </mxCell>
    </UserObject>
    <mxCell id="27" value="My Label" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#808080;strokeWidth=5;shadow=1;labelBackgroundColor=#ffffff;fontColor=#000000;overflow=fill;" parent="1" vertex="1">
        <mxGeometry x="587.5" y="80" width="120" height="80" as="geometry"/>
    </mxCell>
</root>

`

Kind regards,
Dennis

@algenty
Copy link
Owner

algenty commented Apr 25, 2020

I don't know why at this time but with a previous libs of draw.io, it works
I need to investigate
Can u try this alpha ?
agenty-flowcharting-panel-0.8.0-SNAPSHOT.zip

@bijwaard
Copy link
Author

Hi Arnaud,

I just tested the alpha snapshot and it does show the labels correctly, thanks!
I hope you can trace back what happened with the new drawio libs.

Kind regards,
Dennis

@bijwaard
Copy link
Author

Hi Arnaud,

This issue seems to occur again in flowcharting v0.8.1 and v0.9. Is there a work-around for this?

Kind regards,
Dennis

@algenty
Copy link
Owner

algenty commented Jun 23, 2020

HI Dennis (@bijwaard)
How do you do ?
With the help of drawio team
this bug is solved since last week (see jgraph/drawio#989)
i need to test and push a fix.

br
arnaud

@bijwaard
Copy link
Author

bijwaard commented Jun 24, 2020

Hi Arnaud,

I'm fine, have been working hard during the lock-down on kernel, C++, Python fixes and IoT maintenance (e.g. Influxdb out-of-memory on embedded), like most Internet nomads;-) How are you?

Thanks for taking this issue up with the drawio team, I'll be happy to try the fix after you pushed it.

Kind regards,
Dennis

@algenty
Copy link
Owner

algenty commented Jul 4, 2020

Hi, if possible, can you try version 0.9.1 downloadable at
https://algenty.github.io/flowcharting-repository/ARCHIVES.html

@bijwaard
Copy link
Author

bijwaard commented Jul 5, 2020

Hi Arnaud,
I just installed this 0.9.1 version and restarted grafana and refreshed webpage. Unfortunatelly, the label positions don't seems to have changed, they are still outside their containers. I noticed that also double clicking on a box on the chart sometimes enlarges the box below where I clicked (i.e. when I double-click in the bottom half of the upper box). I.e. when I double click near the misplaced label "ComplexPower" in the figure above, it takes me to the ComplexPower box below it.
Kind regards from Paris,
Dennis

@algenty
Copy link
Owner

algenty commented Jul 8, 2020

Sorry Dennis,
it's my fault, I see this fix is not included, can you download and try again this snapshot ?
Welcome to France, be carefull with covid

@bijwaard
Copy link
Author

bijwaard commented Jul 8, 2020 via email

@algenty
Copy link
Owner

algenty commented Jul 24, 2020

fixed in next version 9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants