Print dialog behaviour
I'm updating some older code that runs a workflow that ends with a Run External command which activates the standard print dialog view from a custom module (a registered command in the module).
The print dialog loads okay but the print scale dropdown, which includes an entry for 'current scale', does not actually reflect the current scale - it always shows the initial scale that the site loaded at. I added a second button to the menu which calls the print dialog directly and it always (as expected) shows the actual current scale in the current scale dropdown entry.
Has anyone else experienced this? Is there some additional step(s) or properties that have to be set in order for the print dialog to update correctly when the view is made visible other than through a toolbar button?
Thanks,
Peter.
0
-
Hi Peter,
I tried this using a simple workflow consisting of just a RunExternalCommand and the command PrintMap. The print dialog worked as expected, it displayed the correct current extent under the Map Scale field. Can you reproduce the same issue with a simple workflow like this? It may be other activities in your workflow influencing the behaviour.
Regards,
Wayne Richard
Latitude Geographics Group Ltd.
Head Office: 300 – 1117 Wharf Street Victoria, BC Canada V8W 1T7
Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com
Developers of Geocortex web-based mapping software | www.geocortex.com
An Esri Platinum Business Partner0 -
Wayne,
Thanks for the reply. The way the existing workflow was implemented was different from how you tested, but it did prove the lightbulb moment I needed.
The issue seems to stem from how the view is enabled. In your workflow you used the simple "PrintMap" command which must do some addtional magic in addition to enabling the print dialog. Our workflow actually calls a function in our custom module, which in turn, calls commandRegistry.command("ActivateView").execute("PrintingView"). Although this does make the print dialog visible it does not update the map scale at all.
Changing the custom module code to simply use commandRegistry.command("PrintMap").execute() seems to make everything work correctly.
Another unrelated (I think) issue with the print dialog is that when using Chrome browser, attempting to add text to the title or notes fields (multiline enabled) it will shift focus away from the textarea after each letter typed. I thought I had seen this issue posted in the forum before but can't find anything related now. It seems to be tied to the input eventhandler in Framework.js (if I remove the eventhandler in developer tools it accepts all my text without losing focus).
Peter.0 -
I should also mention that this was working fine in GVH 2.4.1 but ran into the problems when converting the site to GVH 2.6.1. 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
3 kommentarer