Book a Demo

Author Topic: Publishing in HTML  (Read 10064 times)

Kim_Parker054

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Publishing in HTML
« on: December 03, 2015, 12:44:50 pm »
I would like to know the process on how to ensure diagrams are scaled to fit inside the confines of the browser content area. At present when I publish I am required to scroll both horizontally and vertically in order to see a diagram.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Publishing in HTML
« Reply #1 on: December 03, 2015, 01:03:18 pm »
The diagram page size scaling only seems to work for printing.  As far as I can see there is no option for you to specify resolution when exporting to HTML.

Even if you could I don't imagine it would be particularly useful.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Publishing in HTML
« Reply #2 on: December 03, 2015, 01:32:01 pm »
The "process" would be:
Modify the templates to add javascript for handling load and window resize.

Kim_Parker054

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Publishing in HTML
« Reply #3 on: December 03, 2015, 03:24:09 pm »
Thanks for the responding. It would seem that the Enterprise Architect will not be as useful as I had hoped. I would have seemed a simple matter to have had an option to scale images to fit into the onscreen HTML container. Not being able to see a model in its entirety without having to scroll will mean that I will not be able to 'sell' the tool to my employer. Printed documentation I can readily do in Visio and Word. The ability to publish as interactive HTML was quite compelling.

Unless someone can suggest how and where to apply some appropriate javascript I cannot see how to progress.

Thanks again

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Publishing in HTML
« Reply #4 on: December 04, 2015, 08:29:03 am »
The problem isn't with adding options. Enterprise Architect seems to have 10 million of them at times, and even with my meager javascript knowledge I know roughly what to do. On the other hand, I'm not sure it's going to be all that beneficial once the diagram is too small to see the details.

Enterprise Architect's primary 'sell' isn't in the HTML documentation. The tool offers a lot more than that. But if scaling down diagram images to fit on screen in the HTML documentation is a critical feature for you, might I suggest hiring a consultant to customize the HTML templates more to your liking?

Kim_Parker054

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Publishing in HTML
« Reply #5 on: December 04, 2015, 12:03:21 pm »
Not a particularly helpful response. HTML documentation is in fact my primary selling point. Other tools I have used have allowed for the viewing of the entire model including a zoom in/out function.

Working for a Charitable organisation funds can be better spent than on consultants. If the tool is unable to do as I require (useful HTML publication) easily then regardless of its many other good points I cannot sell the benefit. I will seek an alternative unless you are prepared to share your 'meager javascript knowledge seeing you have indicated you know roughly what to do.

Thanks anyway

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Publishing in HTML
« Reply #6 on: December 04, 2015, 02:50:54 pm »
Quote
The "process" would be:
Modify the templates to add javascript for handling load and window resize.

Will that play well with the automatically generated map?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Publishing in HTML
« Reply #7 on: December 07, 2015, 08:55:26 am »
I'm not suggesting changing the map.

Update the diagram template to add a class or id to the diagram image if there isn't one.
Change the Javascript template (which is all the javascript in one template) to add an extra function.
Change the the template for the page load to call the new function in onload and onresize.

Anything beyond that is a matter of a couple of web searches for examples.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Publishing in HTML
« Reply #8 on: December 07, 2015, 09:00:26 am »
Quote
I'm not suggesting changing the map.

Update the diagram template to add a class or id to the diagram image if there isn't one.
Change the Javascript template (which is all the javascript in one template) to add an extra function.
Change the the template for the page load to call the new function in onload and onresize.

Anything beyond that is a matter of a couple of web searches for examples.

I might be being thick but if your javascript function scales the image the map coordinates become incorrect, you'd need to scale the image and dynamically generate a new map.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Publishing in HTML
« Reply #9 on: December 07, 2015, 09:20:07 am »
Possibly I'm being too optimistic about browser capabilities.

If they can zoom an entire website and maintain an image map then I would hope they could do the same thing with a sized image.

Failing that, I would imagine you could implement an onclick for the image that restores the original size and restores the image map.

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Publishing in HTML
« Reply #10 on: December 07, 2015, 12:27:33 pm »
Quote
Possibly I'm being too optimistic about browser capabilities.

The image map was introduced in HTML 3.2 circa 1997.  That's a pretty old technical standard that Sparx is using to render the model usable in HTML.

The actual solution would be for the HMTL export to actually export SVG (or get rid of shapescript and go SVG everywhere.)