Namespaces
Variants
Actions

Template talk:inheritance diagram

From cppreference.com

Contents

[edit] ImageMap suggestion: Use 'desc none' to suppress blue circle icon

Not sure how much attention these talk pages get, and I don't see any signs of an {{Edit fully-protected}}-style request template (ref: enwiki:Template:Edit fully-protected), but I guess I'll try here for starters...

[edit] Suggestion

Please edit the template code to:

<div class="t-inheritance-diagram">
{{#if:{{{image|}}}
 |{{#if:{{{map|}}}
   |{{#tag:imagemap |
      Image:{{{image|}}}{{!}}center
      {{{map|}}}
      desc {{{desc|none}}}
    }}
   |[[Image:{{{image|}}}]]
  }}
 |{{error|No image specified}}
}}
<div style="text-align:center;">
{{small|Inheritance diagram}}{{{notes|}}}
</div>
</div><noinclude>{{documentation}}</noinclude>

(The only change is the addition of a line containing "desc {{{desc|none}}}" underneath "{{{map|}}}".)

[edit] Explanation

Adding "desc none" to the imagemap commands by default will suppress the not-particularly-useful "more information" icon that the ImageMap extension overlays onto images by default. Leaving it as a parameter allows callers to supply a different argument for desc should they need to. (The normal default is 'bottom-right'.)

[edit] Demonstration

Using the {{inheritance diagram/std-domain error}} diagram as an example:

  • Current output of {{inheritance diagram/std-domain error}}
    cpp/error/exceptioncpp/error/logic errorstd-domain error-inheritance.svg
    About this image
    Inheritance diagram
  • After this change
    cpp/error/exceptioncpp/error/logic errorstd-domain error-inheritance.svg
    Inheritance diagram
  • After this change, if |desc=top-left is added to the code for {{inheritance diagram/std-domain error}}
    cpp/error/exceptioncpp/error/logic errorstd-domain error-inheritance.svg
    About this image
    Inheritance diagram

-- FeRDNYC (talk) 07:14, 17 June 2020 (PDT)