I'm trying to use a model stored through the database plugin, and re-create a view with an image, followed by the appropriate hotspots to link down to. Ie, I'm not using the supplied HTML report capability directly.
I found an interesting problem, and described it more thoroughly in this post: https://github.com/archi-contribs/database-plugin/issues/30#issuecomment-365719413
When I export the model using the database plugin, I get the tables of models, views in the model, and objects in the views, including the location information about objects on the view.
When I export the model using the Jasper HTML plug in, that information gets converted to HTML, and images get created, as well as the image map locations for the objects on the HTML view. However, the locations in the HTML view are offset from the ones in the database.
The images that get exported also seem to be cropped in some way, so that the view objects don't show up in the same map location as when I look at it through Archi. It's like some image whitespace gets cropped (left and top maybe?) when the image screenshot is created.
What's interesting is that the HTML Jasper report seems to be able to adjust for that shift, but the database details do not.
The Diagram in Archi.png file attached shows the diagram in the Archi view mode.
The Diagram in Jasper HTML.png file attached shows that same diagram in the HTML report mode. Notice that much of the whitespace in the view has been removed, and the image starts much closer to the top left of the HTML view.
The Jasper HTML report creates the following locations for the clickable objects, and these click properly:
<area shape="rect" coords="10,10,130,65" href="../views/846bccbc-4ca2-43a0-b73a-c1872cf32d38.html" target="view">
<area shape="rect" coords="10,94,130,149" href="../views/fbab4b24-67f8-4616-bed5-2a0e334bfbac.html" target="view">
<area shape="rect" coords="10,214,130,269" href="../views/18a30867-b4e3-48cd-80da-10d0a4083640.html" target="view">
However, this coordinates from the database for the same clickable objects are (in the following, only critical area shape information left in so more easy to match to above example):
<area shape="rect" coords="214,58,396,175" title="846bccbc-4ca2-43a0-b73a-c1872cf32d38"/>
<area shape="rect" coords="214,142,396,259" title=" fbab4b24-67f8-4616-bed5-2a0e334bfbac"/>
<area shape="rect" coords="214,262,396,379" title="18a30867-b4e3-48cd-80da-10d0a4083640"/>
I suspect that the database mechanism is providing the coordinates of the objects on the Archi view, not against the exported screenshot dimensions.
So, after a very long winded explanation, is there some other offset information associated with a view that can be exported to the database information, to allow the object mapping to be created correctly?
It seems like the database plugin exports all the information it can find, so then my question is, what does the Jasper report do differently to allow the image map for the objects to be created correctly?
As Hervé says. There is also a 10 pixel border around each diagram.
Can the same type of calculated offsets the HTML export does be saved in the database tables as well? I understand the original values are there for recreating the map as is on Archi. It would really help what I'm doing. Perhaps as additional information on the objects?
You, as always, are a gentleman and a scholar, Hervé.
It's kind of cool, seeing people excited about being able to use processes :-).