MashZone NextGen 10.2 | Appendix | Legacy Presto components | Mashables and Mashups | Mashups in MashZone NextGen Wires | Customizing Wires | Update Labels and Icons for Custom Blocks in Wires | Block Icons
 
Block Icons
You can also supply images to use as icons for a custom block using the macro metadata element <icon> in <block>.
If you supply a custom icon, you must provide two images of the correct size for the Wires Blocks Menu and for the canvas:
<macros xmlns="http://www.open-mashup.org/schemas/v1.0/EMML"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openmashup.org/schemas/v1.0/EMML/..
/schemas/EMMLPrestoSpec.xsd"
domain="myBlocks">

<macro name="helloWorld"
xmlns:presto="http://www.jackbe.com/v1.0/EMMLPrestoExtensions"
xmlns:macro="http://www.openmashup.org/schemas/v1.0/EMMLMacro">
<presto:macro-meta>
<block usage="Wires">
<label>Hello world!</label>
<icon usage="menu" url="http://myOrg.com/images/smallMacroIcon.png"/>
<icon usage="canvas" url="http://myOrg.com/images/lgMacroIcon.png"/>
</block>
</presto:macro-meta>
....
</macro>
...
</macros>
Custom block icon images can be in any format that is web accessible. The size of the image for each icon is:
*menu icon = a maximum of 14 pixels square, with no border.
*canvas icon = exactly 40 pixels square, including a 2-3 pixel border. The built-in Wires blocks use an icon that is 38px square with a 2px drop shadow. The border is 2px wide in #818181 grey.
Tip: Canvas icons should always have a border to ensure that input and output ports for the block render well and are clearly associated with that block.
As with all icons, the image should be graphic and easy to distinguish from the icons for other blocks.
The URL to icons can be absolute when the image is hosted in a web server or application server that is accessible to the MashZone NextGen Server.
You can use relative URLs for icons if a MashZone NextGen administrator uploads the images. Use a URL in the form /mashzone/files/path/filename where path/filename is the name assigned to the image in MashZone NextGen.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release